Teach Yourself PIC Microcontrollers | www.electronicspk.com | 143
As we have defined the character map as 8
bits wide, whereas our actual character is using only 5 bits.
There are 3 bits empty, 1 on right and 2 on left side of each character. If we want to ignore the highest 2
bits, and we just want to send the lowest 6
bits to the display, for each character, we can do that by just
mentioning the number of bits in Shout command. Change the Shout command like this:
SHOut SER,SRCLK,
lsbfirst
,[s[n]\6, s[n +1]\6, s[n+2]\6, s[n+3]\6]
Notice the \6 with every byte sent. If this
is not mentioned then default, 8 bits is assumed. You can send any
number of bits you want. The result of this would be:
You
can make these letters
scroll, make special effects, and
animations,
however we leave
this to you, so that you learn
while explore.
s[b]=
ERead (z[c]*8)+i
Chia sẻ với bạn bè của bạn: