scrolling text input? for pic18f4520 with 2x16 lcd


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: scrolling text input? for pic18f4520 with 2x16 lcd

    This is totally off the top of my head, no code:

    Use an array with 1 element for each character on display.
    - if 4 characters, then use 4 elements starting at 0.

    Store the position of each character in the array.
    - character 1 starts at 0 on startup, so array(0)=1.

    Use a lookup table to display each character.

    Lcdout (clear screen)
    For element = 0 To 3 (if using 4 characters)
    Lookup array(element),[0,1,2,3,4,5,6,7,8,9,A,B,C],byteout
    Lcdout byteout at next position on display
    Next element

    -syntax must be corrected.
    - never used lookup so not sure if it starts at 0 or 1.
    - I remember concatenating characters on the same LCD line, somewhere.


    Ok Art, now it's your turn.

    Robert

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: scrolling text input? for pic18f4520 with 2x16 lcd

    Well since I was invited it's either what you said, or look up from on-chip eeprom if all lookup tables are going to end up the same.

    Much nicer if it was just numeric values, and you could just increment/decrement each byte with the up/down button pushes.

    After that first attempt, I'm not going to code it without a test circuit here...

  3. #3
    Join Date
    Feb 2012
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: scrolling text input? for pic18f4520 with 2x16 lcd

    cool, I just need some hints on the algorithm , or rather a better way of writing...

    shouldn't have any problem writing the code myself

    thanks again, lets hope my weekend will be fruitful

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: scrolling text input? for pic18f4520 with 2x16 lcd

    Actually if it's just "0,1,2,3,4,5,6,7,8,9,A,B,C"
    You should still just increment or decrement the values and use LCDOUT outputting the hex byte values.
    That string is still sequential when expressed in hex format. Just a value from 0 to 12.


    .

  5. #5
    Join Date
    Feb 2012
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: scrolling text input? for pic18f4520 with 2x16 lcd

    I am going to do this

    hexadecimal increment/decrement from 0 to C

    position 1 to 4

    store the position 1-4 to a temp location

    all 4 temp location , combine into a string

    eg

    going to input A123 memory

Members who have read this thread : 0

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