hi everyone, i have this 20x2 vfd that is driven by four uln5812 vfd drivers. each uln5812 is a 20 bit shift register. two of the drivers take care of the 40 grids, and the other two take care of the 35 segments (5x7 dot matrix). it took me all day to map the bits to segments/grids, and i shifted out static characters on individual grids.
here's where the fun starts; i need to scan the grids, and this is the approach im trying;
will this work? can i shift bits in a 40 bit variable?Code:grid var bit[40] 500 hz interrupt routine pseudocode: grid[40] = grid[40] << 1
quest two:
i need to load this 40 bits onto 5 bytes that will be shifted out to the grid drivers:
how do i load the bits in grid[40] onto grid1, grid2, grid3, grid4, grid5?Code:grid1 var byte grid2 var byte grid3 var byte grid4 var byte grid5 var byte shiftout portd.0, portd.1, msb[grid1\8, grid2\8, grid3\8, grid4\8, grid5\8]
in short, what is the easiest way to do a 40 bit scan, and then load it onto the 5 bytes?
im putting a lot of effort on this code project because i just snagged 16 of this vfd displays at a repo/surplus auction for $5. (they are inside some omni 490 credit card machines). so its worth it. thanks for reading




Bookmarks