My next project is a small Surface Grinder which has three axis motorised tables, X, Y, and Z.
I am using a and 16F18875,32 40 pin device to control the three stepper motors, 3 position DRO's, the limit switches and the grinder motor.
I was not expecting problems as early on in the project as this, but frankly the compilation errors have me baffled.
The demo code is directly from the Great Cow BASIC documentation, GLCD Overview under 'ST7920 Controllers'
A few errors in the code - a Constant and two missing variables. Plus, the calls to the library are out of date. So, the code below uses the renamed calls in the library.
The ST7920 is a slow but cheap GCLD. Intended for the Chinese market. I fell for the pricing years ago to discover it was so slow.
Hopefully, the program works for you.
I will update the Help to remove the constant that should be a variable.
I will define a new Development Policy. All code in the Help must be 'included' in the Help source file(s). This will support the testing of all Help example programs being tested as part of the release/test suite.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another problem. In the demo code it refers to the following:
#define GLCD_Enable PORTA.1 'example port setting
#define GLCD_RS PORTa.0 'example port setting
#define GLCD_RW PORTA.2 'example port setting
#define GLCD_RESET PORTA.3 'example port setting
#define GLCD_DATA_PORT PORTD 'example port setting
The issue is with the final definition, " #define GLCD_DATA_PORT PORTD"
I'm not too sure about this port D issue, as soon as I allocate GLCD_DATA_PORT to a physical port, i,e, C.5 the glcd_st7920.inc kicks in and halts the compiler.
Secondly, where the blue blazes is this connected too on the ST7920 GLD Module.
Anyone who has any knowledge of the connectivity of the ST7920 GLCD, I would be grateful for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This specific device using an 8-bit bus, meaning there are 8 connections between the mcu and the GLCD. The GLCD_DATA_PORT configures the library to use the 8 bits on the specified port. The other connections are required and are self described.
The library assumes an 8bit data bus.
I2C or SPI connectivity would need to be added.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My next project is a small Surface Grinder which has three axis motorised tables, X, Y, and Z.
I am using a and 16F18875,32 40 pin device to control the three stepper motors, 3 position DRO's, the limit switches and the grinder motor.
I was not expecting problems as early on in the project as this, but frankly the compilation errors have me baffled.
The demo code is directly from the Great Cow BASIC documentation, GLCD Overview under 'ST7920 Controllers'
The Errors are as follows
The last two errors seem to point to the include libraries. It looks like I am missing something major in the setup.
No errors in the library.
A few errors in the code - a Constant and two missing variables.
Plus, the calls to the library are out of date. So, the code below uses the renamed calls in the library.
The ST7920 is a slow but cheap GCLD. Intended for the Chinese market. I fell for the pricing years ago to discover it was so slow.
Hopefully, the program works for you.
I will update the Help to remove the constant that should be a variable.
Great ! That compiles okay - Thank you.
Forever in your debt Sir.....
Compiling is good. Does it work?
I will define a new Development Policy. All code in the Help must be 'included' in the Help source file(s). This will support the testing of all Help example programs being tested as part of the release/test suite.
Another problem. In the demo code it refers to the following:
The issue is with the final definition, " #define GLCD_DATA_PORT PORTD"
I'm not too sure about this port D issue, as soon as I allocate GLCD_DATA_PORT to a physical port, i,e, C.5 the glcd_st7920.inc kicks in and halts the compiler.
Secondly, where the blue blazes is this connected too on the ST7920 GLD Module.
Anyone who has any knowledge of the connectivity of the ST7920 GLCD, I would be grateful for your help.
This specific device using an 8-bit bus, meaning there are 8 connections between the mcu and the GLCD. The GLCD_DATA_PORT configures the library to use the 8 bits on the specified port. The other connections are required and are self described.
The library assumes an 8bit data bus.
I2C or SPI connectivity would need to be added.