Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20606

BASCOM-AVR : KTM-S1201 serial LCD help needed : REPLY

$
0
0
digits are sent as 1 byte text (ascii) is sent as 2 byte [code:1:4bb57f075f]memcpy_P( &ucByte, &LCD_SegTable[ucIndex], 1 ); ucBuffer[1] = 0xd0 | ( ucByte & 0x0f ); ucBuffer[0] = 0xd0 | ( ucByte >> 4 ); data_out( ucBuffer, 2, KTM_S1201_COMMAND );[/code:1:4bb57f075f] [code:1:4bb57f075f]Dim Ucbyte As Byte , Ucbuffer(8) As Byte , Tmp As Byte 'as test lookup is B or b Ucbyte = &H4F 'B or b if you do Ucbyte = Ucbyte -32 'Print Ucbyte 'B or b Tmp = Ucbyte And &H0F Ucbuffer(2) = &HD0 Or Tmp 'Print Ucbuffer(2) Shift Ucbyte , Right , 4 Ucbuffer(1) = &HD0 Or Ucbyte 'Print Ucbuffer(1) Shiftout Lcd_si , Lcd_sck , Ucbuffer(1) , 0 Shiftout Lcd_si , Lcd_sck , Ucbuffer(2) , 0 'Data_out(ucbuffer , 2 , Ktm_s1201_command ) [/code:1:4bb57f075f] it must be some thing like this

Viewing all articles
Browse latest Browse all 20606

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>