Hi to all,
I'm a newbie in PIC programming , someone know the PICBASIC PRO code to make this with
a pic 16f84a?
I try to make this but don't work.
Thank and sorry for my enlish
Hi to all,
I'm a newbie in PIC programming , someone know the PICBASIC PRO code to make this with
a pic 16f84a?
I try to make this but don't work.
Thank and sorry for my enlish
Hi mosbc69
How far have you got already with this project?I try to make this but don't work.
do you have the circuit built?
rgds
Duncan
This is the code:
TRISA=%00000000
TRISB=%00000000
PORTA=%00000000
PORTB=%00000000
x var byte
z var byte
X=0
start:
gosub scan
portA=%00000001
PORTb=z
PAUSEus 150
x= x+1
gosub scan
portA=%00000010
PORTb=z
PAUSEus 150
x= x+1
gosub scan
portA=%00000100
PORTb=z
PAUSEus 150
x= x+1
gosub scan
portA=%00001000
PORTb=z
PAUSEus 150
x= x+1
gosub scan
portA=%00010000
PORTb=z
PAUSEus 150
IF x>4 then X=0
GOTO START
scan:
lookup x,[$60,$50,$48,$47,$40],z
return
With this code i can show the character (in this case the number 7) but i can't move it
from right to left.
Well, there's nothing in your code to make it slide left to right, up to down, or otherwise...Code:TRISA=0:TRISB=0:PORTA=0:PORTB=0:x var byte:z var byte:X=0 start: gosub scan:porta=1:portb=z:pauseus 150:x=x+1:gosub scan:porta=2:portb=z pauseus 150:x=x+1:gosub scan:porta=4:portb=z:pauseus 150:x=x+1:gosub scan porta=8:portb=z:pauseus 150:x=x+1:gosub scan:porta=16:portb=z:pauseus 150 IF x>4 then X=0 GOTO START scan: lookup x,[$60,$50,$48,$47,$40],z : return
Think about it. You're displaying 'chunks' of this character. You need to make the 'chunks' appear in different spots.
How could you do that?
i know that i must make 'chunks' of character , but after how can i move it ?
Again, think about it...
If the 1st column chunk gets sent to the 1st column, and the 2nd column chunk gets sent to the 2nd column, and so on and so on......then you have to move the 2nd column chunk to the 1st column chunk, move the 1st column chunk to the 5th column chunk...and so on and so on, until everything is moved over...then display it all over again.
But, you're reading all of your data from a 'fixed' place and displaying it to those same 'fixed' places.
Now how could you possibly change the place where the data is sent without changing the place where you got it from?
Or, how could you change the order in which you read the data to send out without changing the place that you're sending it to?
Bookmarks