LCD serial backpacks


Results 1 to 40 of 68

Threaded View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818

    Default LCD serial backpacks

    Hi Everyone,
    It seems as if, . . . the LCD serial backpack device must be the
    Crown Jewels, of PICdome as I have been unable to wrestle suitable
    code out of the internet. Posted below is a modified version of some code
    I found somewhere, probably for a BS1, anyway I tweaked it some and it works after a fashion, but I think it needs something in the way of a buffer
    and some code to make changes on the fly, like does the cursor blink or not
    etc. . . I think it would be way cool to fashion a workable public domain
    serial unit, so newbies and non-newbies have access without forking up $35 bucks for a serial LCD.

    Anyone up to the challange? As I have been coding PIC micros only since 08/06, My coding skills are not there yet, but thanks to you all I am learning.
    Joe


    Code:
    @ DEVICE pic16F628A, HS_OSC
     
    @ DEVICE pic16F628A, WDT_ON
    ' Watchdog Timer
     
    @ DEVICE pic16F628A, PWRT_ON
    ' Power-On Timer
     
    @ DEVICE pic16F628A, MCLR_ON 
    ' Master Clear Options (Internal)
     
    @ DEVICE pic16F628A, BOD_OFF
    ' Brown-Out Detect
     
    @ DEVICE pic16F628A, LVP_OFF
    ' Low-Voltage Programming
     
    @ DEVICE pic16F628A, CPD_OFF
    ' Data Memory Code Protect
    ' Set to CPD_OFF for Development Copy
    ' Set to CPD_ON for Release Copy
     
    @ DEVICE pic16F628A, PROTECT_OFF
    ' Program Code Protection
    ' Set to PROTECT_OFF for Development Copy
    ' Set to PROTECT_ON for Release Copy
     
    trisb = %00000001
    trisA = %11110011
    include "modedefs.bas"
    ' Define LCD registers and bits
    Define LCD_DREG PORTB
    Define LCD_DBIT 4
    Define LCD_RSREG PORTB
    Define LCD_RSBIT 2
    Define LCD_EREG PORTB
    Define LCD_EBIT 3
     
    DEFINE LCD_LINES 4         'Define using a 2 line LCD
    DEFINE LCD_COMMANDUS 2000    'Define delay time between sending LCD commands
    DEFINE LCD_DATAUS 50     'Define delay time between data sent.
    DEFINE OSC 20
     
    char Var byte ' Storage for serial character
     
     
     
    CMCON = 7 ' PORTA is digital
     
    Pause 100 ' Wait for LCD to startup
    high PortA.2 ' power for backlight
    low PortA.3 ' backlight ground
     
    main:
     
    Lcdout $FE, 1 ' Initialize and clear display
    LCDOUT $FE, $0C
     
    LCDOUT "My Flash Text" 
    pause 800
    Lcdout $FE, 1,$FE, 2
     
    goto loop
     
     
    loop: Serin PORTB.1,N9600,char ' Get a char from serial input
    Lcdout char ' Send char to display
     
    Goto loop ' Do it all over again
     
    End
    Last edited by ScaleRobotics; - 30th May 2010 at 01:24.

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, 19: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, 02:48
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Serial LCD
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th November 2007, 08:31
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07

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