Автор Тема: Графический экран на контроллере UC1601s  (Прочитано 571 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн Gennadiy

  • Administrator
  • Пользователь
  • *****
  • Сообщений: 127
Схема подключения и операторы языка для управления  тут - http://www.picping.lg.ua/eth_pic_basic/index19.htm

Пример программы демонстрации возможностей

0005 LINIT 2,3,15:REM Инициализация UC1601s
0006 AT 10,0:LPRINT "Граф. дисплей"
0007 AT 0,1,1:LPRINT " 132*64 UC1601s "
0008 FOR I=2 TO 7:REM Вывод знакогенератора
0010 AT 0,I,0:GOSUB 20
0011 NEXT I
0012 PAUSE 2000:FOR K=0 TO 7
0014 AT 0,K:I=K+8:GOSUB 20
0015 NEXT K
0016 PAUSE 2000:GOTO 25
0017 REM ***********************************
0020 FOR J=0 TO 15
0021 $(0)=I*16+J:LPRINT $(0)
0022 NEXT J
0024 RETURN:REM ****************************
0025 CLS:REM Вывод прямых линий
0026 FOR I=0 TO 15
0027 J=I*4:POINT 0,J,1:DRAW 131,J,1
0028 NEXT I
0031 FOR I=0 TO 32
0032 J=I*4:POINT J,0,1:DRAW J,63,1
0033 NEXT I:REM Вывод наклонных линий
0034 PAUSE 2000:CLS:FOR I=0 TO 15
0051 J=I*4:POINT 0,0:DRAW 131,J,1:J=I*8:POINT 0,0
0052 DRAW J,63,1:NEXT I
0053 POINT 0,0:DRAW 130,63,1:PAUSE 2000:CLS
0055 FOR I=0 TO 15
0056 J=I*4:POINT 131,0:DRAW 0,J,1:NEXT I
0058 PAUSE 2000:CLS:FOR I=0 TO 26
0059 J=I*5:POINT 0,0:DRAW J,63,1:NEXT I
0060 PAUSE 2000:CLS:FOR I=0 TO 26
0061 J=I*5:POINT 130,0:DRAW J,63,1:NEXT I
0062 PAUSE 2000:REM Вывод треугольников
0065 REM ***********************************
0070 AT 0,0,0:CLS:K=0:FOR I=0 TO 4
0072 K=K+8:J=I*17+30:POINT J,K:L=J+20:M=K+20:N=J-20
0073 DRAW L,M,1:DRAW N,M,1:DRAW J,K,1
0074 NEXT I
0075 PAUSE 2000:CLS
0076 REM ***********************************
0077 :REM Вывод интерактивного меню
0080 AT 0,0,0:LPRINT " File "
0081 AT 40,0,0:LPRINT " Edit "
0082 AT 80,0,0:LPRINT " About "
0083 POINT 0,10,1:DRAW 131,10,1:DRAW 131,11,1:DRAW 0,11,1
0084 PAUSE 800:AT 0,0,1:LPRINT " File ":PAUSE 800
0085 AT 0,0,0:LPRINT " File ":AT 40,0,1:LPRINT " Edit "
0086 PAUSE 800:AT 40,0,0:LPRINT " Edit "
0087 AT 80,0,1:LPRINT " About ":PAUSE 800
0090 AT 0,0,1:LPRINT " File "
0091 AT 80,0,0:LPRINT " About ":PAUSE 800
0092 AT 5,2,0:LPRINT " Open "
0093 AT 5,3,0:LPRINT " Save "
0094 POINT 2,13,1:DRAW 46,13,1:DRAW 46,35,1:DRAW 2,35,1
0095 DRAW 2,13,1:PAUSE 800
0096 AT 5,2,1:LPRINT " Open ":PAUSE 800
0097 AT 5,3,1:LPRINT " Save "
0098 AT 5,2,0:LPRINT " Open ":PAUSE 800
0099 POINT 2,13,0:DRAW 46,13,0:DRAW 46,35,0:DRAW 2,35,0
0100 DRAW 2,13,0
0101 AT 5,2,0:LPRINT "      "
0102 AT 5,3,0:LPRINT "      ":PAUSE 800
0103 REM *******
0105 AT 0,0,0:LPRINT " File "
0106 AT 80,0,1:LPRINT " About ":PAUSE 800
0107 AT 20,2,0:LPRINT " PICuBASIC Ver 3.3 "
0108 AT 20,3,0:LPRINT " www.picping.lg.ua "
0109 POINT 18,13,1:DRAW 131,13,1:DRAW 131,35,1:DRAW 18,35,1
0110 DRAW 18,13,1:PAUSE 2000:CLS
0111 REM ******* Вывод картинки ******************
0120 DATA #(0),0,0,0,0,0,0,0,0,0,0,0,0,7,255,192,0
0121 DATA #(16),0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,240
0122 DATA #(32),62,62,56,30,30,28,14,30
0123 DATA #(40),29,31,60,30,15,63,60,28
0124 DATA #(48),62,56,248,112,0,0,0,0,0,0,0,0,0,0,7,255
0126 AT 30,0,0
0127 FOR I=0 TO 63
0128 LCDD #(I)
0129 NEXT I
0130 DATA #(0),3,3,3,3,3,3,3,3,2,3,3,3,3,127,255,3
0131 DATA #(16),3,3,3,3,3,3,3,3,3,3,3,3,195,243,63,179
0132 DATA #(32),160,32,224,224,224,224,112
0133 DATA #(39),240,240,176,48,224,192,128,128,0
0134 DATA #(48),0,0,255,56,24,8,24,24,12,12,12,12,6,6,6,3
0136 AT 30,1,0
0137 FOR I=0 TO 63
0138 LCDD #(I)
0139 NEXT I
0140 DATA #(0),224,128,0,0,0,0,128,0,0,0,0,0,0,0,255,0
0141 DATA #(16),0,128,224,96,96,56,24,48,28,14,6,6
0142 DATA #(28),7,31,254,134
0143 DATA #(32),6,6,199,227,224,195,7,6,3,3,3,3,0,0,1,3
0144 DATA #(48),130,252,63,0,0,0,0,0,0,0,0,0,0,0,0,0
0146 AT 30,2,0
0147 FOR I=0 TO 63
0148 LCDD #(I)
0149 NEXT I
0150 DATA #(0),3,7,6,7,3,3,3,3,6,2,14,12,24,12,15,12
0151 DATA #(16),14,7,0,0,0,0,0,0,0,0,0,0,0,0,3,15
0152 DATA #(32),24,48,103,231,199,193,192,192
0153 DATA #(40),224,224,224,224,112,48,152,206
0154 DATA #(48),127,49,48,48,32,96,64,192,128,0,0,0,0,0,0,0
0156 AT 30,3,0
0157 FOR I=0 TO 63
0158 LCDD #(I)
0159 NEXT I
0160 DATA #(0),0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0161 DATA #(16),0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,120
0162 DATA #(32),28,6,3,3,3,3,195,255,31,31,255,195,1,1,1,0
0163 DATA #(48),0,0,128,0,0,0,0,0,0,3,3,14,24,240,128,0
0166 AT 30,4,0
0167 FOR I=0 TO 63
0168 LCDD #(I)
0169 NEXT I
0170 DATA #(0),240,120,120,120,120,56,40,56,56,56,56,56,56
0171 DATA #(13),56,56,56,56,56,120,120,120
0173 DATA #(21),248,248,120,248,224,192,96,56,15,3,0,0,0,0
0174 DATA #(35),0,0,14,31,48,224,192,240,159,142,128,128,128
0175 DATA #(48),128,128,199,255,48,0,0,0,0,0,0,0,0,1,255,224
0176 AT 30,5,0
0177 FOR I=0 TO 63
0178 LCDD #(I)
0179 NEXT I
0180 DATA #(0),191,252,224,0,0,0,0,0,0,0,0,0,0,0,0,0
0181 DATA #(16),0,0,0,0,0,1,15,63,248,199,143,62,242,179
0182 DATA #(30),51,51,51,147,211,115,115,243,227,1
0184 DATA #(40),1,1,1,129,225,57,13,13
0185 DATA #(48),7,3,1,0,0,0,0,0,128,192,96,48,28,15,3,0
0186 AT 30,6,0
0187 FOR I=0 TO 63
0188 LCDD #(I)
0189 NEXT I
0190 DATA #(0),1,1,7,15,28,24,24,24,24,24,24,16,48,48,48,48
0191 DATA #(16),48,48,48,48,48,48,48,48,48,51,63,62,57,55,54
0192 DATA #(31),19,11,13,6,2,1,1,0,0,0,0,0,3,15,12,24,24
0193 DATA #(48),24,24,24,12,12,6,3,3,1,0,0,0,0,0,0,0
0194 AT 30,7,0
0195 FOR I=0 TO 63
0196 LCDD #(I)
0197 NEXT I
0199 AT 100,7,0:LPRINT "Bye!":STOP


Получится вот так :

https://www.youtube.com/embed/GO_Nw9k2VJU