A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
|
Hi everyone, The schematic for the PIC16F877 shows that port E is represented with only 3 pins. How can I write a specific value (example '001')to these 3 pins (as output) ? Can I just give it the hex value "01"? Also, when I copy the the value of the port to the W register whould the rest of the register (4-7) get set to zeros? Another question, may sound silly but i'm learning here. Is there an easy way to set a single bit (to '1' or '0') in the W register or one of the ports (without doing a logical AND operation on the whole byte)? Thanks in Advance Fares Al-Osaimi |
|
|
|
>The schematic for the PIC16F877 shows that port E is represented >with only 3 pins. How can I write a specific value (example '001')to >these 3 pins (as output) ? Can I just give it the hex value "01"? >Also, when I copy the the value of the port to the W register whould >the rest of the register (4-7) get set to zeros? >Another question, may sound silly but i'm learning here. Is there an >easy way to set a single bit (to '1' or '0') in the W register or one >of the ports (without doing a logical AND operation on the whole >byte)? Might I suggest you download the data sheet for the chip you are interested in and then READ IT. Instructions for testing, setting and clearing individual BITS are clearly explained in the Microchip documentation. |
|
On Fri, 21 Feb 2003, farroos wrote: > ------------------------------------------------------------------------ > NOTE: The author of this message has chosen not to reveal an email > address. You won't be able to reply to the author directly. > ------------------------------------------------------------------------ > Hi every, > > The schematic for the PIC16F877 shows that port E is represented > with only 3 pins. How can I write a specific value (example '001')to > these 3 pins (as output) ? Can I just give it the hex value "01"? > Also, when I copy the the value of the port to the W register whould > the rest of the register (4-7) get set to zeros? > > Another question, may sound silly but i'm learning here. Is there an > easy way to set a single bit (to '1' or '0') in the W register or one > of the ports (without doing a logical AND operation on the whole > byte)? for the ports: set the port direction as output using the tris register then bsf or bcf that port pin for any register: bsf/bcf register, bit position Why don't you try Jal first ? Vasile |
|
Does anyone have any experience using the flash in an F876 for non-volatile storage (I need more than what EEROM can provide) How many times can the Flash be written and read before failure. I have one running now that has been cycling about 30000 times without failure so far........ http://mobile.yahoo.com.au - Yahoo! Mobile - Exchange IMs with Messenger friends on your Telstra or Vodafone mobile phone. |