thank you joe, the problem i have is not lookup or eeprom or lcd,the problem is when i put variables the code doesnt works, like when i put the variables with the code above. i have problem when the pic start it losts betweenm the main shiftout and the variable so it doesnt work bcz im pausing the variable 1000 and shiftout is too fast so can i see the numbers on lcd ,the lcd and numbers shown good but just i add any variables it doesnt work or shift out things , i use pic 16f84 i think it hasnt analog stuff , thank you joe for your best
for b = 0 to 9
lookup n, [...,...,...,],bo
or read ..,..
pause 1000
next b
example
Include "modedefs.bas"
'DEFINE SHIFT_PAUSEUS 1
DEFINE OSC 4
SDO VAR PortB.0
SCLK var PortB.1
DPIN var PORTA.0
CPIN var PORTA.1
B0 var byte
B1 var byte
B2 var byte
B3 var byte
B4 var byte
symbol Digit_1 = portb.4 renaming portb.4 to Digit_1, These can only hold the value 1 or 0
symbol Digit_2 = portb.5
symbol Digit_3 = portb.6
symbol Digit_4 = portb.7
SCLK = 8 attempt to give portb.1 the value of 8 ???
TRISB = 0 set all port b as outputs
for b3 = 0 to 9
I2CREAD DPIN,CPIN,$A0,b3,[B1]
pause 1000
next b
main:
Digit_2 = 1 Make renamed ports HIgh.
Digit_3 = 1
digit_4 = 1
SHiftOUT SDO,SCLK,0,[b1]
Digit_1 = 0
pause 1
Digit_1 = 1
Digit_3 = 1
digit_4 = 1
SHiftOUT SDO,SCLK,0,[b2]
Digit_2 = 0
pause 1
Digit_1 = 1
Digit_2 = 1
digit_4 = 1
SHiftOUT SDO,SCLK,0,[..]
Digit_3 = 0
pause 1
Digit_1 = 1
Digit_2 = 1
digit_3= 1
SHiftOUT SDO,SCLK,0,[..]
Digit_4 = 0
pause 1
goto main
end
and shiftout the variables it keeps just blinkin very slow no numbers nothings .




Bookmarks