hello joe i wrote this code now it works the 7segment and shiftout .but when i vary things it doesnt works and it doesnt show me things, i want to know where i put a variables and how, is pic cant run 2 things in the same times ? (variables and shiftout with digit out) and i keep the shiftout how it is now , please help now it show me 3210 on leds 7segments ,sorry i cant find lcds in my country and i cant send money to buy from europ or usa bcz they dont alow us to send money out, i need to call my friends in spain to buy me them but it will take long 'now im new in pbp i want to learn a bit good and sorry about my english , thank you joe
' I2CREAD and I2WRITE Commands
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
symbol Digit_2 = portb.5
symbol Digit_3 = portb.6
symbol Digit_4 = portb.7
SCLK = 8
TRISB = 0
' i did a variable here lookup or read but it dont work or shiftout,
main:
Digit_2 = 1
Digit_3 = 1
digit_4 = 1
SHiftOUT SDO,SCLK,0,[252]
Digit_1 = 0
pause 1
Digit_1 = 1
Digit_3 = 1
digit_4 = 1
SHiftOUT SDO,SCLK,0,[96]
Digit_2 = 0
pause 1
Digit_1 = 1
Digit_2 = 1
digit_4 = 1
SHiftOUT SDO,SCLK,0,[218]
Digit_3 = 0
pause 1
Digit_1 = 1
Digit_2 = 1
digit_3= 1
SHiftOUT SDO,SCLK,0,[242]
Digit_4 = 0
pause 1
goto main
end
Bookmarks