Electronic goldmine had a deal on CrystalFonz GLCD 12864 with a NT7108 controller. I checked in the GCB libraries and NT7108c was there. What luck. I wanted to make a graphing temperature device.
I can not make the GLCD work by print not graphics.
Yes I did set the V0 pin to -3vdc using a pot between +5vdc and -Vee. i can see the background is little squares on the blue backbackground.
I have search the GCB forum and using Mikan's minimal code. i have tried the demos.
I am using a 16F886. The Databus is on the 'A' port and the control lines on the 'B' bus because i need the hdwe I2C port for the sensor.
GCBCompiler is 9807.
;Chip Settings
#chip16F886,8'#option explicit'#config OSC=INTOSCIO
#include<glcd.h>
#defineGLCD_TYPEGLCD_TYPE_NT7108C' Specify the GLCD type
#defineGLCDDirection0' Flip the GLCD 0 do not flip, 1 flip'#define GLCD_CS1 PORTa.4 'D12toactuallysinceCS1, CS2canbereversedonsomedevices'#define GLCD_CS2 PORTa.5
#defineGLCD_DB0PORTa.0'D0 to pin 7 on LCD
#defineGLCD_DB1PORTa.1'D1 to pin 8 on LCD
#defineGLCD_DB2PORTa.2'D2 to pin 9 on LCD
#defineGLCD_DB3PORTa.3'D3 to pin 10 on LCD
#defineGLCD_DB4PORTa.4'D4 to pin 11 on LCD
#defineGLCD_DB5PORTa.5'D5 to pin 12 on LCD
#defineGLCD_DB6PORTa.6'D6 to pin 13 on LCD
#defineGLCD_DB7PORTa.7'D7 to pin 14 on LCD'#define GLCD_RS PORTc.1'#define GLCD_Enable PORTa.6'#define GLCD_RW PORTc.0'#define GLCD_RESET PORTC.7
#defineGLCD_CS1PORTB.0'CS1 control line
#defineGLCD_CS2PORTB.1'CS2 control line
#defineGLCD_RSPORTB.4'RS control line
#defineGLCD_ENABLEPORTB.5'Enable control line
#defineGLCD_RWPORTB.3'RW control line
#defineGLCD_RESETPORTB.2'Reset control line' Changed timing for 32 mhz device
#defineNT7108CReadDelay9; = 5 normal usage, 5 or above is OK at 32 mhz!
#defineNT7108CWriteDelay2; = 1 normal usage you may get away with 0, 2 or above is OK at 32 mhz!
#defineNT7108CClockDelay2; = 1 normal usage you may get away with 0, 2 or above is OK at 32 mhz!'change to LED height, this,avoids set the 4 LED signals
#defineLED_GLCD_HEIGHTGLCD_HEIGHTdirportc.1out'dir portc.2 insetportc.1onwait2S'------------------------'GCB v0.98.03 2018-10-20'------------------------GLCDCLSWait1SdoForeverGLCDPrint(10,10,"Hello")'Print Hellowait500msGLCDPrint(100,100,"Hello")wait500msline(0,63,64,31)wait400mswait1sportC.1=0wait500msportC.1=1'GLCDCLSloop
note on portC.1 i hung an led for heartbeat / test to check execution of the code. It seems to execute but no display yet.
Then I hooked up the Saleae Logic8 and only the Enable and D/I toggle. never see anything on any of the DB port.
Is there any secrets with the NT7108c? Like do I need pullups? on anything?
I have triple checked wiring and it is solder to proto board.
I'm sorry I thought I answered but i sent it as email replay which don't get here.
Yes I have tried the different delays and actually they are in the NT7108c driver.h
So meanwhile I am starting to hack this by copying the 'InitGLCD_NT7108C' sub from the driver and making it run every big loop.
I wanted to see the signals work and the DB port.
I do see the /rst work and the CS1 and CS2 but still nothing on the dataport DB
Had trouble downloading RC32 from Sourceforge but finally after 3 tries it downloaded and i installed.
The change did not solve the issue. I started with a clean slate and made the Xconnections for control and data port . same results. Full pixel field on a blue background. But nothing printed nor drawn.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was hooking up the Saleae logic analyzer and could get no signals.
Then I put the PortC.1 Led to blink in the program I sent you. It would not blink anywhere
Then I tried the old Mikam.gcb and it wrote stuff on the screen!! yah! and the led blinks.
Electronic goldmine had a deal on CrystalFonz GLCD 12864 with a NT7108 controller. I checked in the GCB libraries and NT7108c was there. What luck. I wanted to make a graphing temperature device.
I can not make the GLCD work by print not graphics.
Yes I did set the V0 pin to -3vdc using a pot between +5vdc and -Vee. i can see the background is little squares on the blue backbackground.
I have search the GCB forum and using Mikan's minimal code. i have tried the demos.
I am using a 16F886. The Databus is on the 'A' port and the control lines on the 'B' bus because i need the hdwe I2C port for the sensor.
GCBCompiler is 9807.
note on portC.1 i hung an led for heartbeat / test to check execution of the code. It seems to execute but no display yet.
Then I hooked up the Saleae Logic8 and only the Enable and D/I toggle. never see anything on any of the DB port.
Is there any secrets with the NT7108c? Like do I need pullups? on anything?
I have triple checked wiring and it is solder to proto board.
Been working on this for a week, no luck.
Mike
Last edit: mmotte 2020-12-01
Have you tried increasing the delays?
I'm sorry I thought I answered but i sent it as email replay which don't get here.
Yes I have tried the different delays and actually they are in the NT7108c driver.h
So meanwhile I am starting to hack this by copying the 'InitGLCD_NT7108C' sub from the driver and making it run every big loop.
I wanted to see the signals work and the DB port.
I do see the /rst work and the CS1 and CS2 but still nothing on the dataport DB
Last edit: mmotte 2020-12-01
I tried writing directly to Port A but in the nt7108c .
And then the most direct.
the bits did not change.
Finally I made a separate PortA program completely bare. and PortA toggles
Proves the hardware and 16F886 are ok but ? which way now.
Let us start at the begining. :-)
Got a photo of the back of the GLCD? Please post one.
Is this the right GLCD....
Here is a picture of the back.
I will be online and able to look my Wednesday @1100 London time.
Last edit: Anobium 2020-12-01
No emergency. I know I got too excited looking
Thanks for help
I have spotted an error in the library. Introduced when I took the library from a contributor.
Please download and use the new release here: https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/
Let me know if this resolves.
Had trouble downloading RC32 from Sourceforge but finally after 3 tries it downloaded and i installed.
The change did not solve the issue. I started with a clean slate and made the Xconnections for control and data port . same results. Full pixel field on a blue background. But nothing printed nor drawn.
OK. Please upload the source and the ASM you are producing.
Here are the two files.
Full pixel field on a blue background What do this mean?
Are you seeing a reset?
I was hooking up the Saleae logic analyzer and could get no signals.
Then I put the PortC.1 Led to blink in the program I sent you. It would not blink anywhere
Then I tried the old Mikam.gcb and it wrote stuff on the screen!! yah! and the led blinks.
Well, the library is not correct when writing to the port. This needs to be resolved. But, you are working now!
So it only works with that one program. I have tried two of the other older variations and they do not work.
Getting closer!
I can hammer on this for a while.
Thanks for you help.
The full port will be a lot faster... when it works.
Please increase NT7108CClockDelay tp 255. If that works then decrease till till stops....
#define NT7108CClockDelay 255