Hello boys and girls,
I have some questions using 16f628a 16Mhz
1) HSERIN 500,MAIN,[WAIT(A), STR SERDATA\17]
I input the A(byte) variable dit per bit and after that I want to read a stream which begins with A.Where is the wrong?Writting WAIT (A) it expects the ascii A which is something stable.
2) WHILE PORTA.3 = 1 AND PORTA.4 = 1
PAUSE 2000
If PORTA.2=1 then
I = I + 1
IF I > 8 THEN I = 1
pause 500
NICK1: WHILE PORTA.3 = 1
SerData[i] = "1"
GOSUB OUT
PAUSE 500
WEND
WHILE PORTA.4 = 1
SerData[i] = "0"
GOSUB OUT
PAUSE 500
WEND
else
GOTO NICK1
endif
WEND
I have 3 buttons.WHILE PORTA.3 and PORTA.4 are pressed together the user can make some changes.If you press THE BUTTON of PORTA.2 you can move to the one of the 8 dot leds(i=1 to 8) and pressing button PORTA.3 or PORTA.4 you can display 1 or 0.
My progaram is not working propertly but it is works.How can I do much more easier and smaller?
Thanks
Best regards
Nikos Geronikolos
HELLAS