Quote (HiSER)
Что значит прошу код?
Да, эмоционально, прошу прощения! Просто достало...
Вопрос1:
#include <ht48r05a-1.h>
#define uchar unsigned char
#define BIAS 0x52
#define SYSEN 0x02
#define LCDON 0x06
#define LCDOFF 0x04
#define cs _pa0
#define wr _pa2
#define dat _pa3
void SendBit_1621(uchar data,uchar cnt) //data high cnt low write to
HT1621, high bit first
{
uchar i;
for(i =0; i <cnt; i ++)
{
if((data&0x80)==0) dat=0;
else dat=1;
wr=0;
_nop();
wr=1;
data<<=1;
}
}
Это процедуры ввода команды в НТ2116
void SendCmd(uchar command)
{
cs=0;
SendBit_1621(0x80,4); //write flag code ”100” and 9 bit command
instruction
SendBit_1621(command,8); //no change clock output instruction,for
convenience
cs=1; //directly write command high bit as ”0”
}
Это процедура записи КОМАНДЫ в драйвер.
Почему процедура SendBit_1621(0x80,4); //write flag code ”100” and 9 bit command
это 9 бит команды? Ведь по определению и=0 до 4 это ПЯТЬ бит? Да и сам флаг "100" трехбитовый, а пересылается 5 бит?
Да и формат общения с драйвером:
First transmit the flag code 101, which indicates that the following will execute a write
operation. Then by transmitting the address code A5~A0 and using D0~D3 to point to
related bit, the related bit can be controlled. The read process, although the flag is not the
same, is similar. For continuous write operations, the start address should be provided;
after the operation has completed the address will be automatically incremented by one.
Ну вот так выглядит НЕ ЭМОЦИОНАЛЬНО!
Далее:
Quote (HiSER)
Надо было не тупо переносить....
Переделал как считал нужным, - вообще не пашет...
Ну, а вообще то вопрос длинный. Я не знаю КАК "подцепить" файл к моим сообщениям. Было бы проще...
Прошу НЕ СИЛЬНО, пинать ногами. Всё еще теплится...