Arraywrite converts all letters to uppercase?


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,078

    Default Arraywrite converts all letters to uppercase?

    Hello.

    Code:
    topline	var byte [6]
    arraywrite topline, ["ABCabc"]
    FOR X=0 TO 6
    LCDOUT $FE, $01, DEC topline[x]
    pause 1000
    next
    Outputs same codes for abc as for ABC. Seems like characters are converted to uppercase?

    Any ways to fix this?

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Arraywrite converts all letters to uppercase?

    What device are you running this on?

    Here it works fine (18F57Q43)
    Code:
    Start:
        HSEROUT["Start", 10,13]
    
        arraywrite topline, ["ABCabc"]
        FOR X=0 TO 6
            HSEROUT [DEC topline[x],10,13]
        next
    Outputs:
    Code:
    Start
    65
    66
    67
    97
    98
    99
    23
    With the 23 at the end being because you're reading past the last character written to the array.

  3. #3
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

    Default Re: Arraywrite converts all letters to uppercase?

    Pic16f886.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Arraywrite converts all letters to uppercase?

    I don't have that chip handy but I did compile the code for it and looked at the .lst file. Needless to say I can't see anything strange
    Code:
    movlw   low (low (_topline))
    movwf   R5
    clrf    (R5) + 1
    movlw   041h
    clrf    PCLATH
    call    ARRAYWRITE
    movlw   042h
    clrf    PCLATH
    call    ARRAYWRITE
    movlw   043h
    clrf    PCLATH
    call    ARRAYWRITE
    movlw   061h
    clrf    PCLATH
    call    ARRAYWRITE
    movlw   062h
    clrf    PCLATH
    call    ARRAYWRITE
    movlw   063h
    clrf    PCLATH
    call    ARRAYWRITE
    As you can see it loads 41,42,43,61,62,63 (hex) so no conversion done. Not there at least.

    /Henrik.

  5. #5
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Arraywrite converts all letters to uppercase?

    How are you checking the output? Is that what's displayed on an LCD? Maybe the issue is with the LCD. If you have a scope with comm protocol, verify the output from the PIC.

  6. #6
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

    Default Re: Arraywrite converts all letters to uppercase?

    I deleted all the code and defines
    did everything from blank sheet, and now it works properly....

Similar Threads

  1. How to Debugin 2 letters and store in microcontroller memory?
    By Jananitharan in forum mel PIC BASIC
    Replies: 3
    Last Post: - 7th April 2011, 01:41
  2. Is there a better way to do this?... strings of letters
    By Heckler in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th March 2011, 13:45
  3. LCD Showes Some Wrong Letters
    By sbobowski in forum General
    Replies: 2
    Last Post: - 23rd September 2008, 19:15
  4. Numbers and Letters After PIC Number
    By kiwipiper in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th October 2007, 09:13
  5. Ditinguish between capital letters and small letters
    By egds in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th September 2004, 13:13

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