kerri wrote: >>>1. I have noticed that if I touch the top of the ic with my finger >>>the usb connection to my computer breaks. Is this normal? >>> >>> >>Not likely... Usually that means a digital IO line has been left >>floating somewhere. Check that every single digital input, including >>ones going to the PC, is definitively held in a valid state. >> >>One example of this would be IO lines on your PIC that aren't being >>connected to them. Either make sure they are set as outputs, or tie them >>to V+ or ground through a 10k resistor. >> >> > >This is about the inputs, I have seen in the datasheet that after power-on >all the TRIS registers are set as inputs. So what is the recommended >practice, I suspect unused pins should be left as inputs, isn't that why >they are reset to inputs in the first place? > > They are set to INPUT at reset so that the chip isn't damaged by something driving the pin at power up. >Secondly, what is the recommended procedure with unused pins, to >leave them alone, or to connect them to gnd or something, don't they >have a week pull up/down internally anyway? > > Assign unused pins as OUTPUTS usually at GND level. You can assign a weak pullup, but they are normally just floating... >And why would touching an input would have any effect on the pic, >unless there is some firmware which is monitoring these pins, which >there isn't, I can't see why this could possibly be the reason, and >maybe it is a capacitance issue, i.e normal expected behaviour? > > Your body has about a 100K to 1M resistance to GND. But more important, your body picks up stray electric fileds, such as flourescent lighting etc. I know of a PIC design that uses the fact that the human body effects pins WITHOUT TOUCHING them (just being closeby). The RC time constant of the design is changed by the presence of the finger, and is detected by the PIC. Take a peek at http://www.bytecraft.com/touchsw.html . --Bob -- Note: To protect our network, attachments must be sent to attach@engineer.cotse.net . 1-520-850-1673 USA/Canada http://beam.to/azengineer -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist