shiftout to vfd problem


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Location
    Kalamazoo
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    i forgot; this is in a 18f4431 running at 40mhz. i also tried all kinds of different speeds, but same results; program on main routine will not run

    Code:
    BUTTONS:
    GRID.0(SCAN) = 0
    IF SCAN >= 39 THEN
    SCAN = 0
    ELSE
    SCAN = SCAN + 1
    ENDIF
    GRID.0(SCAN)= 1
    after more troubleshooting, i found out that its the line highlighted with red that's causing the program not to go to the main loop. any workaround?
    NAG CON WIFE!
    WIFE VAR MOOD

  2. #2
    Join Date
    May 2004
    Posts
    81


    Did you find this post helpful? Yes | No

    Default

    Well, dont know if this helps at all, but here is how I did it with a 16 segment 10 character display.

    I created a word size variable for the 16 segments. There was a look up table to determine which segments to light. Lets say that variable is seg

    Then I had 10 bits for the grids, so lets say that was named grid. since it is more than 8 bits I also made that a word variable

    So, to shift out my code I used:

    Shiftout data,clk,mode [seg/16,grid/16]

    Now to make this more applicable lets say I had a VFD with 20 characters on a 10x2 grid. I could name the first 10 grids grid1 and the 2nd 10 grid2

    shiftout data,clk,mode [seg/16,grid1/16,grid2/16]

    That shifts out a total of 48 bits.


    My problem is figuring out how to get the proc to do other tasks while its still shifting out data. I cant recall the whole code right off but if I recall because the pic was doing all the character generation even with it doing nothing but updating the display it would either be too dim or there would be too much flicker.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts