Hello,
This project uses ports A-B and C to drive a display containing 21 LED's.
To generate the patterns I started with arrays but quickly ran out of space. The following is a partial sample of an array pattern setup. Using binary helps to visualize what the pattern will look like.
ARRAYDATA5:
ARRAY5C[0]=%00000111:ARRAY5B[0]= %00000111:ARRAY5A[0]=%000001
ARRAY5C[1]=%00001110:ARRAY5B[1]= %00001110:ARRAY5A[1]=%000011
ARRAY5C[2]=%00011100:ARRAY5B[2]= %00011100:ARRAY5A[2]=%000111
ARRAY5C[3]=%00111000:ARRAY5B[3]= %00111000:ARRAY5A[3]=%001110
.
.
.
.
RETURN
I looked at the code space playground thread and got some good results, but not perfect. I disabled the LCD code and instead have the data output to portb with led monitors. I put in a 2 second delay between each read.
Decimal DB values give the expected display results however using binary values produces some extra bits within the expected pattern. I tried 14 bits and 8 bits and using the % symbol which the compiler dosen't like.
test pattern does not work properly
Asm
CODE 7190
DB 00000000000001
DB 00000000000010
DB 00000000000100
DB 00000000001000
DB 00000000010000
DB 00000000100000
DB 0
endasm
........................................
this code works
Asm
CODE 7190
DB 1
DB 2
DB 4
DB 8
DB 16
DB 0
endasm
Is there something wrong with entering binary values this way? I must be able to develop patterns in binary. It is just too hard to visualize decimal values.
Maybe I could use the arrays just to develop the patterns then have some utility program convert binary to decimal and generate "DB (decimal}" code somehow. This would make things easier. Any ideas?
Thanks
"Weaseling out of things is important to learn. It's what separates us from the animals... Except the weasel."
Bookmarks