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)
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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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)
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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."
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
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.
That would be great! Thank you.
I will post after 1830 London time today.
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.
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.
For those looking at the new help file, it needs to be unblocked before it can be read.
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.
@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
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
Loop
Last edit: Anobium 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
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
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.
Again, you are little ahead of us. See this link.
https://sourceforge.net/p/gcbasic/discussion/579126/thread/da302460/#d0a7
Can someone please give me the pin outs for 74HC595 to LCD, I can't find the circuit in the help file.
See, here updated this morning with respect to LCD_IO.