I took NXP at their word when they said outer row of pins is Arduino compatible and am now paying for it!
I am trying to use an OSEPP-LCD-01 on my FRDM K64F. I have a developed program that was working on my hand-made LCD module and have changed the pin-outs to connect to the Arduino port configurations.
According to the logic analyser, all is working as planned on 3 of the 4 data bits, and the RS, R/-W and E signals, but Data bit 5, which plugs in to PTA2, is constantly low.
I see that PTA2 is used for JTAG, but surely this is not an issue if I am using the built-in OpenOCD service?
Has anybody tried this?
Thanks in advance,
Nigel
SIM_SCGC5 |= SIM_SCGC5_PORTA_MASK;
PORTA->PCR[2] |= 0x0103;
GPIOA_PDDR |= (0x01 << 2);
send_lcd_nib(0x7);
.
.
void send_lcd_nib(char lcd_data) {
GPIOA_PCOR |= (0x04);
GPIOB_PCOR |= (0x01 <<23);
GPIOC_PCOR |= (0x04);
GPIOC_PCOR |= (0x80);
GPIOC_PSOR |= ((lcd_data & 0x08) );
GPIOC_PSOR |= ((lcd_data & 0x04) );
GPIOA_PSOR |= ((lcd_data & 0x04) );
GPIOB_PSOR |= ((lcd_data & 0x01) <<23);
e();
return;
}
Solved! Go to Solution.
Hi @ve3id ,
You have to mux the pin as GPIO pin, and I think your muxing is not correct.
Instead of |=, you need an assignment:
PORTA->PCR[2] = PORT_PCR_MUX(1) | PORT_PCR_DSE_MASK;
Erich
Hi @ve3id ,
You have to mux the pin as GPIO pin, and I think your muxing is not correct.
Instead of |=, you need an assignment:
PORTA->PCR[2] = PORT_PCR_MUX(1) | PORT_PCR_DSE_MASK;
Erich