ngeronikolos
- 2nd June 2005, 14:56
hello boys and girls,
I am using pic16F627 20Mhz.I have 3 push buttons conected in :
porta.2-->MOVE LEFT
porta.3-->UP
porta.4-->DOWN
I have 8 dot matrix leds connected with my pic.I want pressing 1 time the putton in porta.2 to do changes in the first led UP or DOWN,pressing two times changes to the second led...
The adresse of the of the first led is SerData[2],second SerData[3]...last SerData[9].
.................................................. ..................
i = 1
STATIC:
BUTTON PORTA.2,1,250,250,B0,0,main
i = i + 1
BUTTON PORTA.3,1,250,250,B0,1,INCREASE
BUTTON PORTA.4,1,250,250,B0,1,DECREASE
GOTO MAIN
INCREASE: ASCII = ASCII+1
IF ASCII > 127 THEN ASCII = 0
SerData[i] = ASCII
GOSUB OUT
GOTO STATIC
DECREASE: ASCII = ASCII-1
IF ASCII > 127 THEN ASCII = 0
SerData[i] = ASCII
GOSUB OUT
GOTO STATIC
.................................................. ...................................
Somethinf is not working propertly!!
Any idea
Thanks
Nikos Geronikolos
I am using pic16F627 20Mhz.I have 3 push buttons conected in :
porta.2-->MOVE LEFT
porta.3-->UP
porta.4-->DOWN
I have 8 dot matrix leds connected with my pic.I want pressing 1 time the putton in porta.2 to do changes in the first led UP or DOWN,pressing two times changes to the second led...
The adresse of the of the first led is SerData[2],second SerData[3]...last SerData[9].
.................................................. ..................
i = 1
STATIC:
BUTTON PORTA.2,1,250,250,B0,0,main
i = i + 1
BUTTON PORTA.3,1,250,250,B0,1,INCREASE
BUTTON PORTA.4,1,250,250,B0,1,DECREASE
GOTO MAIN
INCREASE: ASCII = ASCII+1
IF ASCII > 127 THEN ASCII = 0
SerData[i] = ASCII
GOSUB OUT
GOTO STATIC
DECREASE: ASCII = ASCII-1
IF ASCII > 127 THEN ASCII = 0
SerData[i] = ASCII
GOSUB OUT
GOTO STATIC
.................................................. ...................................
Somethinf is not working propertly!!
Any idea
Thanks
Nikos Geronikolos