Very quick qestion regarding 40x2 pins

Steve2381

Senior Member
Hi all
Just designing a new project and I appear to have PDF blindness! I can't find the answers I need.

If connecting this LCD screen to a 40x2 using serial, I assume I need to use Pin 18 for SCL, pin 23 for SDI and pin 24 for SDO.

http://www.mouser.com/ds/2/291/NHD-0420DZW-AB5-247046.pdf

Also, can I use any input/output pin for serin and serout commands, or are they only available on certain pins?
 

hippy

Technical Support
Staff member
The SPI-style communication seems to use a 10-bit data transfer mechanism so seems unsuitable for using the hardware SPI hardware of a PICAXE 40X2. You would have to bit-bang the SPI so it could use any pins.

Yes, SERIN and SEROUT can be used on any pins which can be used as digital I/O ( with a few caveats to that if one wanted to be pedantic ).
 

Steve2381

Senior Member
Mmm... glad I asked. Thanks Hippy.
Trying to find a blue Oled display that I can run off a 40x2... but I am really low on spare pins.

Also... no idea how to bit bang!
 

Steve2381

Senior Member
I need a 4x20 display eclectric.. if I can find a suitable blue Oled, then I could possibly use the serial driver board.

I have redesigned the circuit and managed to get enough pins to run the original display I found in 4 bit Parallel mode... any reason that would not work?
 

hippy

Technical Support
Staff member
Should work okay in 4-bit mode, and if you ask nicely and someone has the time I am sure they could write a bit-banging routine for you.
 
Top