Teach Yourself PIC Microcontrollers | www.electronicspk.com | 141
on serial pin
Now
lets send some pattern, to show this
effect.
SHOut SER,SRCLK,
lsbfirst
,[%
11111110,%10101010,%11001100,%
00011100]
Notice the data, being sent, and the
appearance of ON LEDs in Fig. 8. this
clearly shows
that the first byte sent, goes
to extreme right, and last byte sent goes to extreme left.
If we want to reverse the pattern , we can send Most significant bit first.
Blinking
an LED
In order to make an LED Blink, you have to turn the corresponding column On, and OFF repeatedly after a
set interval.
Chia sẻ với bạn bè của bạn: