hi C,
I am sorry to keep dripping like at tap..., but I do really want to help.
The Holden program is written to suit a bigger PIC than the 18LF2520, it will require extensive changes to make it work.
It is not using SPI commands, but Bit commands.
May I ask why, after fixing the PIC, SPI to 5110 are you changing to a totally different method.?
hi C,
I am sorry to keep dripping like at tap..., but I do really want to help.
The Holden program is written to suit a bigger PIC than the 18LF2520, it will require extensive changes to make it work.
It is not using SPI commands, but Bit commands.
May I ask why, after fixing the PIC, SPI to 5110 are you changing to a totally different method.?
Hi E,
I'm not changing from SPI, only using it as a guide, as I understand that the 5110 needs libraries for the text. CORRECTION: In #101 I said 0x00 produces lines. I should have said 0x00 pixels all off, 0xff pixels all on and 0x01 lines all down the screen.
C.
hi C,
This bit of code sets the LCD write direction [left to right across the screen]
BTW: the text code ASCII table in the Holden file is the same as the Video, but Holden starts at 'A' not like the Video, which is: Space followed by the maths symbols, then the ASCII chars.
I should have said 0x00 pixels all off, 0xff pixels all on and 0x01 lines all down the screen
Which is correct.
hi C,
This bit of code sets the LCD write direction [left to right across the screen]
BTW: the text code ASCII table in the Holden file is the same as the Video, but Holden starts at 'A' not like the Video, which is: Space followed by the maths symbols, then the ASCII chars.
I should have said 0x00 pixels all off, 0xff pixels all on and 0x01 lines all down the screen
Which is correct.
Hi
I tried playing this morning, but the module stopped working so I went back to #96 and this didn't work till I added:
SPICSOn
SPISend 0x55 SPICSOff
WaitUs 1
SPICSOn
SPISend 0xaa SPICSOff C.
hi C,
Not a problem, I am working out a LCD Font that we can use with Oshonsoft Basic.
It looks OK in simulation, let me know when you would like to try writing text to the lcd.
E
EDIT: this should work OK.
SPICSOn
SPISend 0x55
SPISend 0xaa
SPICSOff
EDIT2:
Your posted 5110 has just arrived in good condition.
hi C,
Not a problem, I am working out a LCD Font that we can use with Oshonsoft Basic.
It looks OK in simulation, let me know when you would like to try writing text to the lcd.
E
Morning E,
I'm happy to try any time, at the moment, I'm trying to understand how it works.
Hopefully, next I will add a barometer module also SPI, as an altimeter, so hopefully the 5110 will give the results.
C.
hi C,
Got the 5110 lcd working OK with a 18F4520, displaying ASCII characters.
At the moment I have only have the 'A thru G' ASCII fonts in the font table, it just a chore adding the remainder of the alphanumeric set.
I need to tweak the Contrast setting later.
E
hi C,
Got the 5110 lcd working OK with a 18F4520, displaying ASCII characters.
At the moment I have only have the 'A thru G' ASCII fonts in the font table, it just a chore adding the remainder of the alphanumeric set.
I need to tweak the Contrast setting later.
E
hi,
I will post the program later, managed to improve the Contrast.
Got a decent picture of the displaying LCD, but for some reason I cannot transfer files to my PC, very annoying.
It displays '0123ABCDEFG' top left line.
E
hi C,
This is the latest version of the program , I have added some comments to help you follow the code.
I would suggest you try adding to and modifying this diagnostic program and use the modified program for the work we will do together.
Once you are satisfied, try it within your main project program
E
hi C,
This is the latest version of the program , I have added some comments to help you follow the code.
I would suggest you try adding to and modifying this diagnostic program and use the modified program for the work we will do together.
Once you are satisfied, try it within your main project program
E
Hi
I tried playing this morning, but the module stopped working so I went back to #96 and this didn't work till I added:
SPICSOn
SPISend 0x55 SPICSOff
WaitUs 1
SPICSOn
SPISend 0xaa SPICSOff C.
hi C,
I have been writing to the lcd with that basic program most of the day with no problems at all.
Adding lcd line selection, line start position etc, all working fine.
Next step is to use an analog port and display ADC data.
You seem to have a intermittent fault on your hardware.
E
Give it a try, displays 0 to 9 and DP on all 6 lines of the lcd.
hi jjw,
So did I, will try to figure out why tomorrow.
E
Do you also see those two left side pixels at 0x80 and 0x40.??
I figure the DC level needs checking [later]
main:
'data write to LCD block, specify required positions of X and Y
Thanks, but I have already done that,ref post #118.
E
jjw camerart
EDIT:
NOTE: Oshonsoft MidStr will read the double quote at the start of the string, if the pointer starts at 0 [zero].
The LEN will return the length of the string not counting the quotes.
This was the reason I was getting a space at the start of my displayed lcd string.
Example:
menu1 = "0123456789ABCD"
'gets each ASCII char in turn and writes it to lcd
msg2lcd:
Gosub lcdxy
lcd_data_command = 1 'data
y = Len(msg1)
For x = 1 To y ' using a for 0 to y, will get the double quotes and the full string.
ascval = MidStr(msg1, x, 1)
Gosub chr2lcd
Next x
Return