Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pic 16f84 Rb0 St

Status
Not open for further replies.
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??
 
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?
 
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
 
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.
 
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:
the dude of dudes said:
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.
 

Attachments

  • 1.png
    1.png
    2.9 KB · Views: 225
eng1 said:
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 said:
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.
 
the dude of dudes said:
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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top