LCD serial backpacks


Closed Thread
Results 1 to 40 of 68

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Posts
    33

    Default Parallel LCD to Serial.

    I am new on this forum and also on programming PICs. I was looking for a program that helps me turn my parallel LCD into a serial. That’s what Mr. Darrel Taylor’s program does on “LCD Serial backpacks post #16. I wonder first if I could use his program on a 16F628 because the compiler doesn’t like it as is. Second, on what pin of which port should I connect the serial input on that 16F628 that will drive the parallel LCD. Sorry for these silly questions but I really would like to learn how to do that. Thanks.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Quote Originally Posted by timseven View Post
    I am new on this forum and also on programming PICs. I was looking for a program that helps me turn my parallel LCD into a serial. That’s what Mr. Darrel Taylor’s program does on “LCD Serial backpacks post #16. I wonder first if I could use his program on a 16F628 because the compiler doesn’t like it as is. Second, on what pin of which port should I connect the serial input on that 16F628 that will drive the parallel LCD. Sorry for these silly questions but I really would like to learn how to do that. Thanks.
    It'll work on a 628.
    Check out this thread

    Instant Interrupts - Revisited
    http://www.picbasic.co.uk/forum/showthread.php?t=3251

    The first post shows where to get the files.
    And the rest of the thread will answer many questions.

    hth,
    DT

  3. #3
    Join Date
    Aug 2009
    Posts
    33

    Default Thanks.

    Thank you sir.

  4. #4
    Join Date
    Aug 2009
    Posts
    33

    Default

    Well, after I read a group of posts I started to understand what your interest of introducing these new interrupts was. I am not very familiar with interrupts but I want to take advantage of this new approach. First I did was to try to play with your Blink program and at compilation time (16F628) I got an error: “Variable wsave3 position request 416 beyond Ram_End 335” I have look every where for an explanation of this error with no luck. Please, advice.

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    There is a section in the DT_INTS-14.bas file that has to be adjusted for the chip you are compiling for.
    I wish I could make it automatic, but there's no way to do that.

    For a 16F628, it doesn't have any General Purpose RAM in BANK3. So you have to comment out the wsave3 variable in this section.
    Code:
    wsave       var byte    $20     SYSTEM      ' location for W if in bank0
    ;wsave       var byte    $70     SYSTEM     ' alternate save location for W 
                                                ' if using $70, comment out wsave1-3
    
    ' --- IF any of these three lines cause an error ?? ---------------------------- 
    '       Comment them out to fix the problem ----
    ' -- It depends on which Chip you are using, as to which variables are needed --
    wsave1      var byte    $A0     SYSTEM      ' location for W if in bank1
    wsave2      var byte    $120    SYSTEM      ' location for W if in bank2
    ;wsave3      var byte    $1A0    SYSTEM      ' location for W if in bank3
    ' ------------------------------------------------------------------------------
    The 628 also has Access RAM at address $70 which can be accessed from any bank.
    So commenting everything and uncommenting the $70 variable will work too.
    Either way will work ... take your pick.
    Code:
    ;wsave       var byte    $20     SYSTEM      ' location for W if in bank0
    wsave       var byte    $70     SYSTEM     ' alternate save location for W 
                                                ' if using $70, comment out wsave1-3
    
    ' --- IF any of these three lines cause an error ?? ---------------------------- 
    '       Comment them out to fix the problem ----
    ' -- It depends on which Chip you are using, as to which variables are needed --
    ;wsave1      var byte    $A0     SYSTEM      ' location for W if in bank1
    ;wsave2      var byte    $120    SYSTEM      ' location for W if in bank2
    ;wsave3      var byte    $1A0    SYSTEM      ' location for W if in bank3
    ' ------------------------------------------------------------------------------
    DT

  6. #6
    Join Date
    Aug 2009
    Posts
    33

    Default

    I'll report to you. Thanks

  7. #7
    Join Date
    Aug 2009
    Posts
    33

    Default

    Well, beautiful. I comment out the 3 wsaves and everything came out as planned. I tested the 628 on my breadboard and the led blinked as expected. After that triumph I load your Serialin (I called Parallel to Serial) program and compiled it. I got one error only
    “Error [118] C:\program~1\mecanic~1\mcs\parallel~3 asm 200:Overwriting previous address contents(2007)” As always I try to find that error on the posts and I did but I don’t understand how to fix it. Thanks.

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 20:54
  2. Please help with EDE702 - Serial to LCD interface
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th October 2008, 03:48
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 17:56
  4. Serial LCD
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th November 2007, 09:31
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 27th June 2007, 00:07

Members who have read this thread : 2

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