Page 2 of 2

Re: 18LF2520 with 5110 LCD

PostPosted: Tue Oct 03, 2017 10:28 pm
by drh
Is there a contrast adjustment for the display?

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

Re: 18LF2520 with 5110 LCD

PostPosted: Wed Oct 04, 2017 8:47 am
by camerart
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.

Re: 18LF2520 with 5110 LCD

PostPosted: Wed Oct 04, 2017 2:54 pm
by drh
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

Re: 18LF2520 with 5110 LCD

PostPosted: Wed Oct 04, 2017 4:38 pm
by camerart
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.

Re: 18LF2520 with 5110 LCD

PostPosted: Wed Oct 04, 2017 6:05 pm
by drh
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.