Today 13:48
Forum: Website / Forum Issues
Starter: towlerg
Views: 2
Replies: 0
Go to last post By: John Drew
Today 12:45
Forum: The Lounge
Starter: SimonJA
Views: 113
Replies: 4
Today 11:51
Forum: In Circuit Debugger
Starter: DaveS
Views: 6288
Replies: 23
Today 08:44
Forum: LCD module
Starter: Ledroj
Views: 179
Replies: 6
Yesterday 22:24
Forum: The Lounge
Starter: Henk57
Views: 45
Replies: 1
Yesterday 16:27
Forum: Proton 24
Starter: rcurl
Views: 39
Replies: 1
Yesterday 14:55
Forum: Proton 24
Starter: johngb
Views: 42
Replies: 1
+ Reply to Thread
Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 54

Thread: SPI GLCD Help needed1793 days old

  1. #11
    Senior Member DaveS's Avatar
    Join Date
    Aug 2004
    Posts
    924
    Thumbs Up
    Received: 11
    Given: 1
    Total Downloaded
    676.35 MB

    0 Not allowed!

    Default Re: SPI GLCD Help needed

    I haven't tested the Nokia7110 for a long time, the reason for the shadowram is because you can't read a screen byte, with that controller.
    You'll have to a play with it, I can't remember how far I got with it.
    I think this will enable the Proton compiler drawing routines

    #Disable GLCD_READ
    #Disable GLCD_Plot
    Plot ;WORKS
    LCD@PLOT
    WREG_BYTE X_CursorPos
    movff GEN,Y_CursorPos
    GoTo GLCDSetPixel ; Your Routine

    UnPlot ;WORKS
    LCD@UNPLOT
    WREG_BYTE X_CursorPos
    movff GEN,Y_CursorPos
    GoTo GlcdClearPixel ; Your Routine
    VHBoard
    PIC18_Nokia2_7110.zip

    I hope it still works.
    Last edited by DaveS; 1st May 2012 at 14:36.
    Regards
    Dave

  2. #12
    Senior Member barak's Avatar
    Join Date
    Apr 2008
    Posts
    718
    Thumbs Up
    Received: 47
    Given: 11
    Total Downloaded
    473.80 MB

    0 Not allowed!

    Default Re: SPI GLCD Help needed

    I did the Plot override as per above and added a small loop to Plot a line accross the display.
    I’m getting ASM error: Symbol not previously defined __LCD_PLOT_
    In the ASM code I see F@CALL__LCD_PLOT but there is no functioned with that name.
    What am I missing?
    What

  3. #13
    Developer Les's Avatar
    Join Date
    Feb 2002
    Posts
    2,968
    Thumbs Up
    Received: 176
    Given: 64
    Total Downloaded
    1.02 GB

    0 Not allowed!

    Default Re: SPI GLCD Help needed

    In order to disable all the library's graphic LCD code, use:

    #disable PRINT
    GLCD_CLS,_
    GLCD_READ,_
    GLCD_READTEXT,_
    GLCD_WRITE,_
    GLCD_PIXEL,_
    GLCD_PLOT,_
    GLCD_CURSOR,_
    GLCD_CIRCLE,_
    GLCD_BOX,_
    GLCD_LINE,_
    GLCD_LOW_LEVEL

    Some parameters required are:
    '-------------------------------------------------------------------------------------------------
    ' Box : Draw a SQUARE on the Graphic LCD
    ' Input : GEN2 = YPOS
    ' : GEN2H = XPOS
    ' : WREG = Radius
    ' : BPF,2 is set for Plot and clear for UnPlot
    ' Output : None
    '-------------------------------------------------------------------------------------------------
    ' Circle : Draw a circle on the Graphic LCD
    ' Input : GEN2 = YPOS
    ' : GEN2H = XPOS
    ' : PP3 = Radius
    ' : BPF.2 is set for Plot and clear for UnPlot
    ' Output : None
    '-------------------------------------------------------------------------------------------------
    ' Line : Draw a line on the Graphic LCD
    ' Input : GEN2 = XPOS Start
    ' : GEN2H = YPOS Start
    ' : GENH = XPOS End
    ' : WREG = YPOS End
    ' : BPF,2 is set for Plot and clear for UnPlot
    ' Output : None
    '-------------------------------------------------------------------------------------------------
    ' Plot : Set a pixel on the Graphic LCD
    ' Input : GEN = YPOS
    ' : WREG = XPOS
    ' : BPF,2 is set for Plot and clear for UnPlot
    ' Output : None
    '-------------------------------------------------------------------------------------------------
    ' Pixel : Read a pixel state from a graphic LCD
    ' Input : WREG = XPOS
    ' : GEN = YPOS
    ' Output : WREG or PP7 = State of pixel (0 or 1)
    '------------------------------------------------------------------------------------
    ' LcdRead : Reads a byte from a Graphic LCD
    ' Input : WREG = XPOS
    ' : GEN = Line
    ' Output : PP7 or WREG holds the byte read
    '------------------------------------------------------------------------------------
    ' Putbyte : Display a byte on a Graphic LCD
    ' Input : WREG = Byte to display
    ' : GEN = LINE
    ' : GENH = XPOS
    ' Output : WREG still holds the byte sent
    '------------------------------------------------------------------------------------
    ' Print : Display a character on a Graphic LCD
    ' Input : WREG holds the character to display
    ' Output : WREG still holds the character displayed
    '--------------------------------------------------
    ' Cursor : Position the text cursor on a Toshiba or Samsung graphic LCD
    ' Input : GEN = YPOS (Line)
    ' : WREG = XPOS
    ' Output : None
    For more example programs for Proton and Proton24 or updates, please visit: Proton WIKI or Proton Files

  4. #14
    Senior Member DaveS's Avatar
    Join Date
    Aug 2004
    Posts
    924
    Thumbs Up
    Received: 11
    Given: 1
    Total Downloaded
    676.35 MB

    0 Not allowed!

    Default Re: SPI GLCD Help needed

    I dont know, its been a long time since I tried what you are trying to do, have you tried using the proton circle routine which should use cursor, plot and (LCDread (may be LCDwrite)) (Arr what I said in the last post wont work and circle) sorry.
    Thanks Les just seen your post, brilliant I have also wanted this for a long time
    Last edited by DaveS; 1st May 2012 at 15:36.
    Regards
    Dave

  5. #15
    Senior Member barak's Avatar
    Join Date
    Apr 2008
    Posts
    718
    Thumbs Up
    Received: 47
    Given: 11
    Total Downloaded
    473.80 MB

    0 Not allowed!

    Default Re: SPI GLCD Help needed

    Thanks Les,
    I’ll give it a shot but since I’m clueless when it comes to asm I’ll probably have to bug you guys for more help.

  6. #16
    Senior Member barak's Avatar
    Join Date
    Apr 2008
    Posts
    718
    Thumbs Up
    Received: 47
    Given: 11
    Total Downloaded
    473.80 MB

    0 Not allowed!

    Default Re: SPI GLCD Help needed

    Les, Dave,
    the code to disable the entire graphic LCD library works (I had to change PRINT to PRINT,_ in order to chain all the lines).

    As before, the Print, Cls and Cursor redirects work OK using the names provided by Dave.

    But I must not be very smart as I canít figure out the ďnamesĒ required to redirect any of the other functions.
    For example to redirect Print the name is Print, to redirect Cls, the name is GLCD@CLS and for Cursor the name is GLCD@CUR.
    However, for the other commands I canít figure out what name to use.

    For example Plot,y,x I tried Plot, GLCD@PLOT, etc. but again none works and the compiler generates an error ďSymbol not previously defined __LCD_PLOT_Ē
    Another example LCDWrite y,x,[var] I tried LCDWrite, GLCD@Write doesínt work. I assumed it is redirected via Putbyte so I tried Putbyte, GLCD@PUTBYTE and several other combinations but none was recognized by the compiler.

    Is there a convention for naming these commands in the ASM redirect? what am I missing?

  7. #17
    Member flosi's Avatar
    Join Date
    Oct 2002
    Posts
    186
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    0

    0 Not allowed!

    Default Re: SPI GLCD Help needed

    Can't you just do a search on a assembler file that contains the relevant keywords?

  8. #18
    Senior Member barak's Avatar
    Join Date
    Apr 2008
    Posts
    718
    Thumbs Up
    Received: 47
    Given: 11
    Total Downloaded
    473.80 MB

    0 Not allowed!

    Default Re: SPI GLCD Help needed

    Good idea, thanks

  9. #19
    Senior Member DaveS's Avatar
    Join Date
    Aug 2004
    Posts
    924
    Thumbs Up
    Received: 11
    Given: 1
    Total Downloaded
    676.35 MB

    0 Not allowed!

    Default Re: SPI GLCD Help needed

    Look likes the plot info I gave you is wrong, __LCD_PLOT_ is an asm label the compiler is looking for when you use Plot
    and __LCD_WRITEBYTE_ for LCDWrite
    I think
    Regards
    Dave

  10. #20
    Senior Member barak's Avatar
    Join Date
    Apr 2008
    Posts
    718
    Thumbs Up
    Received: 47
    Given: 11
    Total Downloaded
    473.80 MB

    0 Not allowed!

    Default Re: SPI GLCD Help needed

    Dave, i know that what I need is the ASM "name" for redirecting to these commands. So if in the case of cursor it was GLCD@CUR, what would it be for LCDWrite?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. SPI - (Can't belive a search on SPI yields no results?)
    By Peter Truman in forum Proton Plus Compiler v3
    Replies: 12
    Last Post: 30th September 2012, 10:12
  2. Replies: 7
    Last Post: 21st June 2012, 16:43
  3. Cheap GLCD needed
    By Tim in forum The Lounge
    Replies: 15
    Last Post: 8th September 2009, 18:10
  4. Another connector needed.
    By See_Mos in forum Wanted and For Sale
    Replies: 0
    Last Post: 17th July 2009, 09:01
  5. advice needed
    By C_Moore in forum The Lounge
    Replies: 7
    Last Post: 4th July 2006, 15:48

Members who have read this thread since 17th March 2017, 22:55 : 1

Actions :  (Set Date)  (Clear Date)

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

Tags for this Thread

Posting Permissions

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