Datasheet
Programming PIC Microcontrollers in BASIC - mikroElektronika
TRISB = 0
PORTB = 0
PORTA = 0
do
for i = 0 to 99 ' Count from 0 to 99
' Prepare ones digit
j = i mod 10
por1 = mask(j)
' Prepare tens digit
j = (i div 10) mod 10
por2 = mask(j)
Delay_ms(1000)
next i
loop until false
end.
In the course of the main program, programmer doesn’t need to worry of refreshing the display. Just call the subroutine
mask every time display needs to change.
7.3 LCD Display, 4-bit and 8-bit Interface
One of the best solutions for devices that require visualizing the data is the “smart” Liquid Crystal Display (LCD). This
type of display consists of 7x5 dot segments arranged in rows. One row can consist of 8, 16, 20, or 40 segments, and
LCD display can have 1, 2, or 4 rows.
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/07.htm (9 sur 16)05/11/2004 02:27:46