Compiling the above basic GLCD code gives this warning:
/home/trev/GreatCowBasic/include//glcd_ssd1289.h (460): Warning: Variable
name P1 is used for a system bit on the current chip
I doubt it's fatal as I'm not using the SSD1289 (I also tried commenting out the include of glcd_ssd1289.h in glcd.h which silences the warning).
However, the above code does not display anything on my OLED display. I know the display is working and that the connections are all present and correct because if I load my MikroC version of the program it actually works.
Any ideas?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Try this. Edit the file glcd_SSd1289 and remove the method. SuperCededLine() Start at line 459. This has been superceded.... :-)
If this fails, then, please use I2C Discovery to confirm the I2C setup and the device address. If this I2C Discovery is failing then the GLCD will not work. I always confirm withg I2C Discovery before trying to add the libraries. Because, you may be using a 7bit address... we use 8 bit addressing.
Last edit: Anobium 2018-09-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Edited glcd_ssd1289 and removed SuperCededLine() at line 459 and following.
Recompiled - no warnings
No change - no display
Re-Configured i2cHardwareDiscovery to Terminal_18f14k22.gcb for 18F46J50
Compiled
Ran
Result:
000000000000000001234567789ABCDEF
Not helpful.
So I changed the serial output to flash a LED. 1 sec flash = not detected; 3 sec flash = detected. And I counted... decimal 120 and 121 gave 3 sec flashes, so 0x78 and 0x79.
I edited the originally posted program to subsitute the 8 bit address 0x78 for the 7 bit address 0x3C.
Re-Compiled
Ran - still no display :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You must confirm your config with I2C discovery. Look in your demo folder for a similar device as your starting point. I2C discovery will confirm the address etc.
The serial display was good. :-)
Do you have pullup resistors? When you adapted the code did you change the baud rate ? if so, revert to slower speed.
I have compiled your program and I an see nothing in the ASM that look odd.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Let me get a part here. And, test as you to far away to send me a device. :-) It will only take a few days. But, without a part this is tough to resolve.
But, meanwhile do try the below as 12mhz may look slow.
#chip 18F46J50,32
#config OSC = INTOSC
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There were some chip data file issues (now fixed) and an embarrassing typo in my compiler command line which escaped the compiler's notice but did interesting things to the output but only sometimes.
Thanks to Evan for the hours he spent troubleshooting this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Compiling the above basic GLCD code gives this warning:
I doubt it's fatal as I'm not using the SSD1289 (I also tried commenting out the include of glcd_ssd1289.h in glcd.h which silences the warning).
However, the above code does not display anything on my OLED display. I know the display is working and that the connections are all present and correct because if I load my MikroC version of the program it actually works.
Any ideas?
/home/trev/GreatCowBasic-v0.98.03/include//glcd_ssd1289.h (460): Warning: Variable name P1 is used for a system bit on the current chipThis still occurs with v0.98.03 due to the superceded code in that header.
:-) Odd. 550 Fix GLCD GLCD_SDD1289.h Updated to remove deprecated method [791] So, at commot 791 the change was made... But, I will resolve.
Try this. Edit the file glcd_SSd1289 and remove the method. SuperCededLine() Start at line 459. This has been superceded.... :-)
If this fails, then, please use I2C Discovery to confirm the I2C setup and the device address. If this I2C Discovery is failing then the GLCD will not work. I always confirm withg I2C Discovery before trying to add the libraries. Because, you may be using a 7bit address... we use 8 bit addressing.
Last edit: Anobium 2018-09-17
No change - no display
Re-Configured i2cHardwareDiscovery to Terminal_18f14k22.gcb for 18F46J50
So I changed the serial output to flash a LED. 1 sec flash = not detected; 3 sec flash = detected. And I counted... decimal 120 and 121 gave 3 sec flashes, so 0x78 and 0x79.
I edited the originally posted program to subsitute the 8 bit address 0x78 for the 7 bit address 0x3C.
You must confirm your config with I2C discovery. Look in your demo folder for a similar device as your starting point. I2C discovery will confirm the address etc.
The serial display was good. :-)
Do you have pullup resistors? When you adapted the code did you change the baud rate ? if so, revert to slower speed.
I have compiled your program and I an see nothing in the ASM that look odd.
I have - using the LED flash method rather than HSer, it detects 0x78 (120), 0x79 (121).
Perhaps suggestive of other issues...
Yes - 4K7. As mentioned, the same setup works fine with MikroC and 7 bit I2C address 0x3C (60).
No - I kept it at 9600. I have however also tried 4800 through 115200.
Let me get a part here. And, test as you to far away to send me a device. :-) It will only take a few days. But, without a part this is tough to resolve.
But, meanwhile do try the below as 12mhz may look slow.
With the above, a 3s LED delay turned into about 60s, and no display. Perhaps:
With the above, a 3 s LED delay was 1.5s, but no display.
With the above, a 3s LED delay was 3s :) but no display :(
I don't have that part nor do I know much about the GLCD Libraries so I may be off the mark here.
Is this not a PPS device?
If so you need to use the PPS tool to assign I2C to the Pins you have chosen to use for your application.
.
Yes, the device has remappable pins, but RB4 and RB5 are native SCK1 and SDA1, so do not need remapping. Good thought though :)
Device is on way to me. Should only take a few days.
Please post, as a ZIP, the source and all the compiler files. Hex, asm etc.
SOLVED
There were some chip data file issues (now fixed) and an embarrassing typo in my compiler command line which escaped the compiler's notice but did interesting things to the output but only sometimes.
Thanks to Evan for the hours he spent troubleshooting this.