Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 5th November 2006, 04:12 PM   (permalink)
Default Pic 16f84 Rb0 St

What a cryptic title for a thread! I'm using a 16F84, RB0 is being used to detect the negative edge on the line of an old 8 bit computer I have. I can detect the change fine when polling, but when using it to trigger an interupt it fails. It seems that a Schmitt Trigger is used on RB0 when INTCON, INTE is set, so I am assuming the signal level is too low for the ST. Is there a simple way to boost this signal??
the dude of dudes is offline   Reply With Quote
Old 5th November 2006, 06:11 PM   (permalink)
Default

Quote:
Is there a simple way to boost this signal??
A 4K7 pullup resistor might be all you need. What are the high/low voltage levels from the old 8 bit computer you have?
__________________
--- The days of the digital watch are numbered. ---
kchriste is offline   Reply With Quote
Old 6th November 2006, 01:38 AM   (permalink)
Default

if the polling works then I don't think it's logic levels. More then likely something is wrong with you code. Make sure the global interrupt is enabled
jarph is offline   Reply With Quote
Old 6th November 2006, 02:12 AM   (permalink)
Default

I get a reading of +1.3v/+0v on my scope. I've found a solution using a MAX232, but I don't have one. The connection is T1IN-T1OUT-R2IN-R2OUT, basically converting TTL-RS232-TTL.
the dude of dudes is offline   Reply With Quote
Old 6th November 2006, 03:53 AM   (permalink)
Default

If you have 1.3/0 then a pullup (4.7K as suggested above) to Vdd and a diode between the pin and the signal (Anode to pic input) will give you 5.0/0.7 on the pic input. Much cheaper than a MAX232.

Mike.
edit, woops, no it won't. It will give you 2.0/0.7 unless it's an open collector output in which case you only need the pullup. Worth a try.

Last edited by Pommie; 6th November 2006 at 03:59 AM.
Pommie is online now   Reply With Quote
Old 6th November 2006, 11:38 AM   (permalink)
Default

Quote:
Originally Posted by the dude of dudes
I get a reading of +1.3v/+0v on my scope.
Use a saturated bjt as a switch. This circuit performs a logic inversion. If you care of positive/negative rising edge, just change the INTEDG bit.
Attached Images
File Type: png 1.png (2.9 KB, 11 views)
eng1 is offline   Reply With Quote
Old 7th November 2006, 03:43 AM   (permalink)
Default

Quote:
Originally Posted by eng1
Use a saturated bjt as a switch. This circuit performs a logic inversion. If you care of positive/negative rising edge, just change the INTEDG bit.
At first it held the line low, so I dropped the 3.3k resistor and now it works fine! It seems to have doubled the signal voltage. Very nice indeed! Could you please explain the purpose of the resistor tied to GND?
the dude of dudes is offline   Reply With Quote
Old 7th November 2006, 08:27 AM   (permalink)
Default

Quote:
Originally Posted by the dude of dudes
At first it held the line low, so I dropped the 3.3k resistor and now it works fine! It seems to have doubled the signal voltage. Very nice indeed! Could you please explain the purpose of the resistor tied to GND?
It's to help ensure the transistor turns off properly.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 7th November 2006, 08:53 AM   (permalink)
Default

Quote:
Originally Posted by the dude of dudes
It seems to have doubled the signal voltage. Very nice indeed!
Actually it's not an amplifier. When the input voltage is 1.3 V, the output equals Vsat of your transistor (LOW). When the input voltage is 0, the output is 5 V (HIGH).
It's a TTL converter for non-TTL signals.
eng1 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
PIC 16F84 to 16F628a question lompa Micro Controllers 14 6th September 2007 12:33 PM
pic 16F84 programmer yuchween Micro Controllers 3 11th August 2006 03:40 PM
code convertion 16F628 -> 16F84 patroclus Micro Controllers 6 6th April 2006 08:34 PM
16f84 to 16f877 Ricardoco Micro Controllers 11 16th December 2004 05:38 AM
about 16f84 and 16f877 Nesha Micro Controllers 1 9th November 2004 02:20 PM



All times are GMT. The time now is 05:57 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.