Jump to content
Sign in to follow this  
doozer

External Interrupt Intf

Recommended Posts

Hi,

 

Two questions:

 

1) When using the INTF pin (B0) on the 16f877a device, is a pullup (or down?) resistor necessary when triggering on TTL (5v) serial data?

 

The serial data appears to be inverted (ie. 5v is logic 0). If a pullup is needed, what value?

 

2) Since the serial data is inverted, I need to trigger when it drops to 0v (start bit). Can i effectively do this by triggering on a falling edge rather than the default of a rising edge?

 

Thanks,

Matt.

Share this post


Link to post
Share on other sites

Hello:

 

1) You must enable the internall pull (OPTION_REG) or putting an external pull up(~4,7K to 10K), if your excitation circuit is open collector type. If you excitation circuit is TTL output level, you can connect it directly without pull up resistor to the PIC.

2)Effectively you can generate an IRQ on falling edge.

 

David A. Valdez <_<

Share this post


Link to post
Share on other sites
Guest Guest

OPTION_REG -register bit 6 controls the edge direction. Value 1 means rising edge and value 0 means falling edge.

 

Pull-up isn't needed unless you plan to disconnect the other device. If you need them, then you can use built-in pull-ups with OPTION_REG bit 7 (value 1=disabled, 0=enabled).

Share this post


Link to post
Share on other sites
Guest Dave

doozer,

 

1) TTL outputs are normally push-pull, the pulling capability (current sinking) is greater than the pushing capability (current sourcing).

So you definately should not need a pull down resistor.

 

2) The RS232 data may be inverted or non-inverted. The c2c compiler has a pragma to reverse the logic sense of the data.

This option is available because it depends how you are converting from 5V logic to RS232 logic levels, some devices invert, others do not.

 

Triggering the interrupt on the other edge sounds like the right solution to your start bit detection.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...