Menu

LCD_IO 1 ?

Help
2015-08-23
2015-09-01
  • Jack Hoffnung

    Jack Hoffnung - 2015-08-23

    While browsing in the help files, I found Index of/library/DEMO CODE/demo code for LCD, with code titled Demo mode 1. gcb, and there is a circuit diagram to match. (code reproduced below). HOWEVER, THE NEWEST LCD.H DOES NOT APPEAR TO CONTAIN ANY REFERENCE TO A CONSTANTS NAMED LCD_IO 1 OR LCD_CD.
    HOW CAN THIS WORK? ANY HELP APPRECIATED.

    '''Demo mode 1 with 74HC595 ATMega8.gcb
    '''
    '''This program demonstrates the capabilities of a LCD display using a 1-wire connection.
    '''The LCD is controlled via a shiftreg 74HC595.
    '''For the LCD connection - please refer to the Helpfile.
    '''@author TheoL
    '''@licence GPL
    '''@version 1.0
    '''@date 14.08.2015
    '''**************
    ; ----- Configuration

    #chip mega8,8

    ' Use LCD in 1-wire mode with 74HC595
    ' LCDBacklight is controlling pin 4 74HC595 (in LCD.h)

    #define LCD_IO 1
    #define LCD_CD PORTD.1 ; clock & databit
    #define LCD_NO_RW

    LCDBacklight On

    CLS
    Print "Great Cow Basic"
    Locate 1,0
    Print " Hello World."

     
    • Dean Brice

      Dean Brice - 2015-08-30

      Hi all
      Where can I find the circuit, I have looked in the help and can't find it, can someone please send me a link to it.

      All the Best Dean

       
  • Anobium

    Anobium - 2015-08-23

    We have updated in the planned release. We spotted this a few weeks ago.

    Do you need this capability today? I can post link to latest files.

     
    • Jack Hoffnung

      Jack Hoffnung - 2015-08-23

      That would be great! Thank you.

       
  • Anobium

    Anobium - 2015-08-23

    I will post after 1830 London time today.

     
  • Anobium

    Anobium - 2015-08-23

    So, you are little ahead of us - you spot the new demos. I am impressed. I did post some new demos last week in preparation to the next planned release of Great Cow Basic.

    So, here are the links to the pieces of the puzzle.

    Latest Help. This is work in progress but this does contain the latest information with respect to the LCD code. This have the correct links to the library etc.

    Latest LCD.h. This is the proposed LCD.h for the new release. This does support LCD_CD.

    Latest LCD Demo's

    Please note. Your version of GCB@SYN should support the Helpers to the Help File via function key F1.

     
  • Jack Hoffnung

    Jack Hoffnung - 2015-08-23

    THANKS so much; looking forward to playing with this. I had found other 1-wire solutions on the net but wasn't sure how to make them work with GCB.

     
  • Jack Hoffnung

    Jack Hoffnung - 2015-08-23

    For those looking at the new help file, it needs to be unblocked before it can be read.

     
  • Theo

    Theo - 2015-08-24

    Jack and others,

    please notice that there could be a timing problem with LCD_IO 1;
    if I stress the display, I get occasionally a corrupted
    character, mostly with a clock speed of 16 Mhz.
    Some extra delay might solve the problem, but I'm studying on it.

    Theo.

     
  • Anobium

    Anobium - 2015-08-24

    @Theo. Can you look at using LCD_SPEED within the solution? You can add specific timings for LCD_IO 1 like I had to for LCD_IO 10.

    Cheers

     
  • Jack Hoffnung

    Jack Hoffnung - 2015-08-25

    I breadboarded the circuit, and changed the demo code slightly, for the 12F683 PIC. When I run the code, I get nothing at all on the LCD. I used my oscilloscope to look at the signal coming from the PIC, and it changes every 3 seconds, which makes me think it's a problem with my circuit, although I have checked it against the schematic numerous times. I am using the new LCD.h library. Could it be my code? (below)

    ~~~~~

    chip 12F683, 8 ;PIC12F683 running at 8 MHz

    config mclr=on ;reset handled manually

    config osc=int ;internal RC clock

    ' Use LCD in 1-wire mode with 74HC595
    ' LCDBacklight is controlling pin 4 74HC595 (in LCD.h)

    #define LCD_IO 1
    #define LCD_CD GPIO.0 ; clock & databit
    #define LCD_NO_RW

    LCDBacklight On
    Do Forever
    CLS
    WAIT 3 s
    PRINT "START TEST"
    locate 1,0
    PRINT "DISPLAY ON"
    wait 3 s

    CLS
    Locate 0,0
    Print "Cursor ON"
    Locate 1,0
    LCDcursor CursorOn
    wait 3 S
    
    CLS
    LCDcursor CursorOFF
    locate 0,0
    Print "Cursor OFF"
    wait 3 s
    
    CLS
    Locate 0,0
    Print "FLASH ON"
    Locate 1,0
    LCDcursor FLASHON
    wait 3 s
    
    CLS
    locate 0,0
    Print "FLASH OFF"
    LCDCURSOR FLASHOFF
    wait 3 sec
    
    Locate 0,0
    Print "CURSR & FLSH ON"
    locate 1,0
    LCDCURSOR CURSORON
    LCDCURSOR FLASHON
    Wait 3 sec
    
    Locate 0,0
    Print "CURSR & FLSH OFF"
    locate 1,0
    LCDCURSOR CursorOFF
    LCDCURSOR FLASHOFF
    Wait 3 sec
    
    CLS
    Locate 0,4
    PRINT "Flashing"
    Locate 1,0
    Print "Displ+Backlight"
    wait 500 ms
    repeat 5
      LCDCURSOR LCDOFF
      LCDBacklight Off
      wait 500 ms
      LCDCURSOR LCDON
      LCDBacklight On
      wait 500 ms
    end repeat
    
    CLS
    Locate 0,0
    Print "DISPLAY OFF"
    Locate 1,0
    Print "FOR 5 SEC"
    Wait 2 SEC
    LCDCURSOR LCDOFF
    WAIT 5 s
    
    CLS
    Locate 0,0
    LCDCURSOR LCDON
    Print "END TEST"
    wait 3 s
    

    Loop

     

    Last edit: Anobium 2015-08-26
  • Theo

    Theo - 2015-08-26

    Jack,

    I haven't tested the code with a PIC, in the moment there's no one available.

    Did you build the shiftreg as in the diagram; with a BS170 as monoflop(one-shot)? This is essential. The LCD_IO 1 is based on this hardware.
    Your code seem OK to me. Please, check your hardware again.

    The hardware used is based on an artical in the great magazine Elektor 07/08-2015; which is an extention of this hardware: www.romanblack.com/shift1.htm

    Check also this URL's:
    wwww.elektor-labs.com/node/3598
    www.elektormagazine.de/130397

    Theo.

     

    Last edit: Theo 2015-08-26
  • Jack Hoffnung

    Jack Hoffnung - 2015-08-29

    Theo,
    Thanks for asking me to re-check my setup; I tore it down and rebuilt it and it works fine. Thanks also for the links! Noticed that the schematic left out the LCD backlight control circuitry to be attatched to pin 4 of the shift register.
    Jack

     
  • Jack Hoffnung

    Jack Hoffnung - 2015-08-29

    After updating my lcd.h library with the newest to test out LCD_IO 1, I tried to run some older programs I had wriitten for a 2-wire solution that used to work fine, but now didn't work at all. However, when i reverted back to the previous lcd.h, they worked fine again. it would appear some unintended change has been made in the newest lcd.h.

     
  • Dean Brice

    Dean Brice - 2015-09-01

    Can someone please give me the pin outs for 74HC595 to LCD, I can't find the circuit in the help file.

     
  • Anobium

    Anobium - 2015-09-01

    See, here updated this morning with respect to LCD_IO.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.