From your post i can see that you have a 16 row by 32 Cols
the easy way i would have dont this is use PortB & Portc for for Rows
Then use 4 74hc595 shift reisters for your cols to give you 32bits then use the shiftout command.
Here is an example of an 8 Row by 16 Cols
i used portb for the Rows and 2 74hc595 for the cols
This should get you started
' Program USING 74HC595 .BAS
INCLUDE "Modedefs.bas"
ADCON1=7
TRISA=0:TRISB=0:TRISC=0
'PORT ASSIGNS******************************************* ***
DataP VAR PORTC.0'Data pin (74x595.14)
Clk VAR PORTC.1'shift clock (74x595.11)
Latch VAR PORTC.2'Output Latch(74x595.12)
RowVAR BYTE
'Variables ***********************************************
Delay CON 0'Delay
pattern VAR WORD 'Output pattern
A VAR BYTE ' Loop counter for 16 values of Rows
Pause 1000
Low Latch
main :
pattern = %0000000000000001 'pattern for my columns
For A=0 To 15 ' set the Count 16 times
LookUp A,[0,255,255,24,24,255,255,0,0,255,255,219,219,195,19 5,0],Row
'Those values in the Table should give HE on your display
ShiftOut DataP,Clk,msbFirst,[pattern\16] 'Send pattern to 74x595
PORTB=0 'Blank portb before changing
column
PulsOut Latch,1 'Latch 74x595 outputs
PORTB=Row 'Transfer values from table to
portb
Pause Delay 'Delay
pattern=pattern <<1 'shift pattern 1 place the to left
Next A 'this should give me 0000000000000001 to 1000000000000000
GoTo main
Isaac
Bookmarks