Hi All,
I'm having an issue trying to configure the pins PTD, and PTE to operate in output mode only. For a test, i tried to toggle PTD4 and PTD5 from low to high and vice versa. Below is a snippet of my code. I had VLL3 connected to VDD (3.3V), but no luck at all.
SOPT1 = 0b11011010;
//clock setting
ICSC1 = 0x06;
ICSC2 = 0x00;
ICSTRM = 0x8B;
ICSSC = 0x20;
/** Enable clock to the LCD module */
SCGC2_LCD = 1;
/** Disable LCD module */
LCDC0_LCDEN = 0;
LCDC1_FCDEN = 1;
LCDSUPPLY_VSUPPLY = 0b11
///Toggle pins direction
PTDDD_PTDDD4 = 0x01;
PTDDD_PTDDD5 = 0x01;
//Switches input controls
PTDD_PTDD4 = 0x01;
PTDD_PTDD5 = 0x00;
I've looked at the below post, but it doesn't help much.
Re: Ports PTB3, PTB4 and PTB5 on MC9S08GW, Open drain function only?
Thank you in advance for any help that can be provided!
Solved! Go to Solution.
Hi All,
Problem solved ! First time working with the GW series. I forgot to enable Port D clock via SCGC3 register, SCGC3_PTD = 1.
Thanks.
Hi All,
Problem solved ! First time working with the GW series. I forgot to enable Port D clock via SCGC3 register, SCGC3_PTD = 1.
Thanks.
Hi Vu
yes, I also send you a sample code on the case that you create.
Regards
Vicente Gomez