Using GPIO on PC9RS08LE4

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

Using GPIO on PC9RS08LE4

跳至解决方案
708 次查看
Darkn3ss
Contributor II

Hello all.

 

Here is the deal.

 

My Vcc is 5V from a 7805 regulator.  I am using a few PC9RS08LE4 samples from Freescale.

 

The code is as follows:

    PTDDD = 0xFF;
    PTDD = 0xFF;

 

What voltage should my 8 port pins be for the output?  The datasheet says Vdd-0.8 is Voh, and 0.8V is Vol, but I am getting 0V low, and only 0.3V when they are all on.

 

I've thought that perhaps the LCD functionality was on, but checking the value of LCDC0 in the debugger, it actually is set to 0x03 (the value after reset).  I tried resetting it to     LCDC0 = 0x00; but no luck.

 

Has anyone had any luck with this part using the LCD pins as GPIO?  I'm certainly missing something here, but I have no idea what it could be.

 

Thank you in advance for any help that can be provided!  :smileyvery-happy:

标签 (1)
0 项奖励
回复
1 解答
337 次查看
Darkn3ss
Contributor II

SOLUTION!

 

Apparently there is an error in my interpretation of the documentation, or the documentation itself.

 

If you turn the LCD off, I would think that a GPIO is a GPIO.  This is not the case.

 

LCDSUPPLY needs to have VLL3 driven externally.  What this means?  I don't know.  Anyways, set LCDSUPPLY = 3;

Then, LCDC1 = 0x03; sets up the GPIO pins shared with the LCD pins to be used as a full complimentary output, instead of an open drain output.  I figured this out luckily because I decided to re-wire one of my NPN transistors with a PNP and totem-pole them for a redundant circuit, and turning on the PNP worked like a charm!  Well, not I know why!  Searched open drain in the RM, and I found this gem.

 

Good luck to anyone else that comes across this!  I hope my solution will help you some.

在原帖中查看解决方案

0 项奖励
回复
1 回复
338 次查看
Darkn3ss
Contributor II

SOLUTION!

 

Apparently there is an error in my interpretation of the documentation, or the documentation itself.

 

If you turn the LCD off, I would think that a GPIO is a GPIO.  This is not the case.

 

LCDSUPPLY needs to have VLL3 driven externally.  What this means?  I don't know.  Anyways, set LCDSUPPLY = 3;

Then, LCDC1 = 0x03; sets up the GPIO pins shared with the LCD pins to be used as a full complimentary output, instead of an open drain output.  I figured this out luckily because I decided to re-wire one of my NPN transistors with a PNP and totem-pole them for a redundant circuit, and turning on the PNP worked like a charm!  Well, not I know why!  Searched open drain in the RM, and I found this gem.

 

Good luck to anyone else that comes across this!  I hope my solution will help you some.

0 项奖励
回复