Winch
Member
Can someone provide me with some additional information about the function Read and Write.
I have some problems with the processing of the code in the program.
Why do these simple code below not work properly?
I have some problems with the processing of the code in the program.
Why do these simple code below not work properly?
Code:
'DEVICE PIC16F628A
Define CONFIG = 0x3f50
Define CLOCK_FREQUENCY = 4
AllDigital 'alle ports digital
'Poortnamen
Symbol led = PORTA.1
Symbol s1 = PORTB.0
'76543210
PORTA = %00000000
TRISA = %11111011
TRISB = %11111111
OPTION_REG.7 = 0
Read 0, led
main:
While s1 = 0
Wend
WaitMs 10
Toggle led
Write 0, led
While s1 = 1
Wend
WaitMs 10
Goto main
End