View previous topic :: View next topic |
Author |
Message |
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
Selection between Schmitt Trigger and TTL Input |
Posted: Thu Apr 12, 2007 10:39 am |
|
|
18F6627 @5V
3.249
Hello All,
I've got an issue where I put a 3V input on a 5V ST pin. As I was debugging I noticed the PIC wasn't picking up when the pin went high. After some reading I see that the ST needs at least 4V for Logic high.
Is there a way I can force a pin (that has either a ST or TTL option) to be TTL? I see that it is most likely to be a ST for standard IO, but special conditions cause it to be a TTL.
Thanks,
John |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Thu Apr 12, 2007 11:19 am |
|
|
You can't change an input from being a Schmitt Trigger to TTL. It's a fixed piece of hardware. Say, on an 18F2525 (one that I'm currently designing around), RB1 can be a digital I/O, external interrupt and an analog input channel. If it's configured to be a digital I/O it will be a TTL input. If it's configured to be the external interrupt then it will be a Schmitt Trigger input. And, of course, if it's an analog input channel then it's input will be analog.
You'll need to look at the spec. sheet for each pin and determine which type it will be. I've been fighting this same problem and had to order a level conversion IC to handle this. I'm trying the MAX3371 and hope that it will allow the devices that operate at the different VCC levels to communicate properly.
Ronald |
|
|
jbmiller
Joined: 07 Oct 2006 Posts: 73 Location: Greensville,Ontario
|
3v to 5 v |
Posted: Thu Apr 12, 2007 3:18 pm |
|
|
If you can't add a 'level translator', you can 'cheat' like I've done defore.
Feed the signal into an analog pin.
Operation is simple, select pin,do the ADC, test if over the 3V 'high' value.
Jay |
|
|
|