Steve2381
Senior Member
Hi all. Tired eyes and a brain that just can't get going... probably should abandon this project for tonight!
I have a Parallel Oled display, and interfacing with it will be a little more of a pain than usual, as I will have to try and use some odd spare pins on a 40x2. The board it is being retro-fitted to is a pre-etched PCB and I don't really want to have to alter it all.
Ideally, I would go 8 bit... but I don't have enough spare. Then to add to the mix, they are not sequential either (not all C.0-C.3 or similar).
DB4, DB5 and DB6 are pin 28 (C.3), pin 24 (C.4) and pin 23 (C.5) respectively. DB7 is pin 34 (B.1). 'RS' is pin 38 (B.5) and 'E' is on pin 40 (B.7). R/W is available on a pin if I need it (But I think that gets tied to Ov?)
My question is that of addressing those pins. Normally, I would set them using dirs %00001111 or similar.... but I cannot do that, as I believe I will affect the status of the other pins on that bank (all pins on the 40x2 are used for various inputs and outputs).
Any shortcuts I could use? Otherwise its going to be a whole load of high/low commands.
I have searched and yet to find an example of 4 bit comms to an oled display... as far as I understand, I basically send the commands each time in two batches on the DB4-DB7 pins (in accordance to the datasheet)
Any pointers to some base code I could adapt would be great. All I have found is 8 bit comms. I started writing some code, and between my stabbing in the dark, the odd pins and my general ignorance... it just isn't going to work.
Datasheet for the display:
http://www.mouser.com/ds/2/291/NHD-0420DZW-AB5-247046.pdf
I know the pin arrangement is far from ideal, but sometimes you just have to go with it! (unless there is actually an incompatibility issue here I am missing)
Failing this.... I suppose I could get an AXE132 serial converter from the store.
Thanks
I have a Parallel Oled display, and interfacing with it will be a little more of a pain than usual, as I will have to try and use some odd spare pins on a 40x2. The board it is being retro-fitted to is a pre-etched PCB and I don't really want to have to alter it all.
Ideally, I would go 8 bit... but I don't have enough spare. Then to add to the mix, they are not sequential either (not all C.0-C.3 or similar).
DB4, DB5 and DB6 are pin 28 (C.3), pin 24 (C.4) and pin 23 (C.5) respectively. DB7 is pin 34 (B.1). 'RS' is pin 38 (B.5) and 'E' is on pin 40 (B.7). R/W is available on a pin if I need it (But I think that gets tied to Ov?)
My question is that of addressing those pins. Normally, I would set them using dirs %00001111 or similar.... but I cannot do that, as I believe I will affect the status of the other pins on that bank (all pins on the 40x2 are used for various inputs and outputs).
Any shortcuts I could use? Otherwise its going to be a whole load of high/low commands.
I have searched and yet to find an example of 4 bit comms to an oled display... as far as I understand, I basically send the commands each time in two batches on the DB4-DB7 pins (in accordance to the datasheet)
Any pointers to some base code I could adapt would be great. All I have found is 8 bit comms. I started writing some code, and between my stabbing in the dark, the odd pins and my general ignorance... it just isn't going to work.
Datasheet for the display:
http://www.mouser.com/ds/2/291/NHD-0420DZW-AB5-247046.pdf
I know the pin arrangement is far from ideal, but sometimes you just have to go with it! (unless there is actually an incompatibility issue here I am missing)
Failing this.... I suppose I could get an AXE132 serial converter from the store.
Thanks