Haxby
24-01-2006, 10:33
I have been using the direct Hitachi LCD connection method with the initialisation code as outlined in the picaxe interfacing circuits manual.
It has been working just fine. For those that don't know the hardware setup, essentially, pins 2,3,4,5,6 and 7 are used to send commands to the LCD screen in 4 bit binary mode. Pins 0 and 1 are not required.
The initialisation code as outlined works well but as it uses the "let pins" command, it also affects pins 0 and 1, which are not connected.
As I have other things I want to connect to pins 0 and 1 in my circuit, I wish to ensure that their state does not change. Specifically, I want pin 0 to stay high, and I want pin 1 to stay low no matter what.
The offending lines of code in the initialisation section, and in the wrins and wrchr section are as follows:
let pins = 48
let pins = 32
let pins = 128
let pins = b1 & 240
let pins = b2 & 240
I think that the & character blocks out some of the pins but I am not sure how that works as it is not clear in the basic commands manual. Could someone please shed some light on this?
It has been working just fine. For those that don't know the hardware setup, essentially, pins 2,3,4,5,6 and 7 are used to send commands to the LCD screen in 4 bit binary mode. Pins 0 and 1 are not required.
The initialisation code as outlined works well but as it uses the "let pins" command, it also affects pins 0 and 1, which are not connected.
As I have other things I want to connect to pins 0 and 1 in my circuit, I wish to ensure that their state does not change. Specifically, I want pin 0 to stay high, and I want pin 1 to stay low no matter what.
The offending lines of code in the initialisation section, and in the wrins and wrchr section are as follows:
let pins = 48
let pins = 32
let pins = 128
let pins = b1 & 240
let pins = b2 & 240
I think that the & character blocks out some of the pins but I am not sure how that works as it is not clear in the basic commands manual. Could someone please shed some light on this?