Unable to Set 9S08GW Pins With LCD to output only

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Unable to Set 9S08GW Pins With LCD to output only

跳至解决方案
657 次查看
Designer11
Contributor IV

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!

标签 (1)
0 项奖励
回复
1 解答
512 次查看
Designer11
Contributor IV

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.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
513 次查看
Designer11
Contributor IV

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.

0 项奖励
回复
512 次查看
vicentegomez
NXP TechSupport
NXP TechSupport

Hi Vu

yes, I also send you a sample code on the case that you create.

Regards

Vicente Gomez

0 项奖励
回复