18LF2520 with 5110 LCD

Re: 18LF2520 with 5110 LCD

Postby drh » Tue Oct 03, 2017 10:28 pm

Is there a contrast adjustment for the display?

Just looked at the data sheet. Is your code working the CS line?
User avatar
drh
Verified identity
 
Posts: 53
Joined: Tue May 27, 2014 3:31 pm
Location: Laguna Niguel, Calif.
PIC experience: Professional 5+ years with MCHP products

Re: 18LF2520 with 5110 LCD

Postby camerart » Wed Oct 04, 2017 8:47 am

drh wrote:Is there a contrast adjustment for the display?

Just looked at the data sheet. Is your code working the CS line?

Hi D,
I think so, just below ALL DIGITAL.
C.
User avatar
camerart
 
Posts: 9
Joined: Sun Oct 01, 2017 9:20 am
PIC experience: Experienced Hobbyist

Re: 18LF2520 with 5110 LCD

Postby drh » Wed Oct 04, 2017 2:54 pm

Where is the CS line being dropped and raised in this routine?


lcd_write_byte:
For li = 0 To 7
lk = 7 - li
lj = 1
lj = ShiftLeft(lj, lk)
lj = lj And byte_to_send
If lj = 0 Then
'send a zero bit
Low lcd_data
Else
'send a one bit
High lcd_data
Endif

'toggle the clock line
High lcd_sck
ASM: nop
Low lcd_sck

Next li
Return
User avatar
drh
Verified identity
 
Posts: 53
Joined: Tue May 27, 2014 3:31 pm
Location: Laguna Niguel, Calif.
PIC experience: Professional 5+ years with MCHP products

Re: 18LF2520 with 5110 LCD

Postby camerart » Wed Oct 04, 2017 4:38 pm

Hi D,
It doesn't appear to be there!!
I have tried all day to decode the program into0 Oshonsoft, then I realised that as Oshonsoft have it's own way of writing to SPI, I need to re-write it.
Have you used Oshonsoft? SPI looks like this: attached SPI
I will follow this 5110 set-up guide, which has an Arduino program, where I have found and enclosed the [includes] I don't get on with Arduino. See attached:
C.
EDIT: Previous question regarding contrast, yes there is, in the attachments.
Attachments
LEARNING 5110.txt
(11.42 KiB) Downloaded 7 times
SPI.pdf
(142.27 KiB) Downloaded 8 times
User avatar
camerart
 
Posts: 9
Joined: Sun Oct 01, 2017 9:20 am
PIC experience: Experienced Hobbyist

Re: 18LF2520 with 5110 LCD

Postby drh » Wed Oct 04, 2017 6:05 pm

No, I have never used the Onhosoft compiler. I program 99% in C with CCS or Microchip x8, x16, or x32.
The lcd routine is a bit-banged version but it's not complete so it won't work.
User avatar
drh
Verified identity
 
Posts: 53
Joined: Tue May 27, 2014 3:31 pm
Location: Laguna Niguel, Calif.
PIC experience: Professional 5+ years with MCHP products

Previous

Return to Graphics and LCD

Who is online

Users browsing this forum: No registered users and 1 guest

cron