See:
10k is a good value here.
{Should I mention weak pull-ups?}
Now that gets me to thinking: Here is a neat trick to get a 'push-pull' output from two PORT A pins:1: define them as analog (ADCON1)
2: TRIS them as outputs.Now, when you BSF either of them the other will automatically be cleared.
Any time you read the port you will reset the 'current value' condition for the pins.So, if you take an interrupt and read the port to see what changed it will reset the interrupt condition. This is good.
Where you get in trouble is if _another_ change in the input occurs just at the moment you are reading the port. In this case you can miss it.
But, if you know for certain that a second change on any of the inputs cannot occur before you get into your interrupt handler and read the status you will be ok.
see also:
Comments:
Questions:
I am trying to use a pic16c74 in the Slave parrallel port mode where portd can be read and written to by another processor. I want to read the IBF input buffer full but after writting to the portD the IBF bit never goes high. Am I missing something?
file: /Techref/microchip/portpins.htm, 4KB, , updated: 2010/2/25 16:40, local time: 2024/8/14 19:37,
18.227.209.249:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/Techref/microchip/portpins.htm"> PIC Microcontroller port pins</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.