PDA

View Full Version : help plz i want to make a digital clock using 74hc164 and picbasic pro



malwww
- 1st May 2009, 02:11
please help i want to make a digital clock using picbasic pro and pic 16f84a and shift register ic 74hc164 4 digit lcd and i tested the instriction shiftout it works good but i dont know much about variables and this if my first test program it count from 0 to 9 please i need help how to use variables with shiftout and if there r any other ways thank you .


Include "modedefs.bas"

DEFINE SHIFT_PAUSEUS 1000


TRISB = 0
TRISA = 1
main:
porta.0 = 0

SHiftOUT portb.0,portb.1,LSBFIRST,[252\8]
pause 1000
SHiftOUT portb.0,portb.1,LSBFIRST,[96\8]
pause 1000
SHiftOUT portb.0,portb.1,LSBFIRST,[218\8]
pause 1000
SHiftOUT portb.0,portb.1,LSBFIRST,[242\8]
pause 1000
SHiftOUT portb.0,portb.1,LSBFIRST,[102\8]
pause 1000
SHiftOUT portb.0,portb.1,LSBFIRST,[182\8]
pause 1000
SHiftOUT portb.0,portb.1,LSBFIRST,[190\8]
pause 1000
SHiftOUT portb.0,portb.1,LSBFIRST,[224\8]
pause 1000
SHiftOUT portb.0,portb.1,LSBFIRST,[254\8]
pause 1000
SHiftOUT portb.0,portb.1,LSBFIRST,[246\8]
pause 1000


goto main


end

Archangel
- 1st May 2009, 06:00
i dont know much about variables and this if my first test program it count from 0 to 9 please i need help how to use variables with shiftout and if there r any other ways thank you Variables are just places in memory set aside to store ones and zeros, that place gets an alias (NAME) chosen by you when you write the program. Here is a thread to a tachometer I wrote using shiftout to a 4 digit LED display. A lot of what you need to do was done here. Look the code over and read all the posts. http://www.picbasic.co.uk/forum/showthread.php?t=9037

malwww
- 1st May 2009, 08:23
thank you joe about ur reply and helps hope your doing great