Introduction:
Hello all, what a great support community we have going here. I am brand new to all of this, programming PICs, using GCB to code, etc. I do have 4 years of electronics experience from high school so I have enough electrical theory to get me by, just never wrote code straight to a PIC ever.
I have a sleeve of 12F683 which I will be burning with a PICkit 2 clone board. (just the USB board, I seem to be missing the programmer 2 go module). I have everything connected up, and talking to each other; I wrote my first working program last night:
#chip 12F683, 4
#config OSC = INTOSCIO
DIR GPIO.5 out
start:
set GPIO.5 OFF
wait 500 ms
set GPIO.5 ON
wait 500 ms
goto start
This tells me I have everything working properly, my LED is blinking at roughly 0.5 second intervals.
My only real question so far is if I can plug the PIC straight into my power supply at 4.5 volts or should I be limiting current with a resistor, or possibly filtering with a cap or diode or something to protect the chip? My only other experience programming a PIC was with a BASIC Stamp, which fully supports the pic. Now that I am using stand alone PICs, I want to be sure I wont destroy them all before I get to do something useful with them!
Thanks for taking the time to read through my introduction. Ill post what I intend to do next in a follow up post to keep things clear and concise. Have a great day!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) Always use a 0.1uf cap across the Vdd and Vss pins of the micro.
2) If there are higher load demands of the circuit like a servo, or IR distance sensor, then add 10uf-100uf filter cap. Check the devices data sheet for specific recommendations.
3) When breadboarding a project I tend to live dangerously, battery leads a flying. Of course I have paid the price with a few popped I.C.'s over the years.
4) When I graduate to a proto or circuit board then I like using polarized connectors, so I don't have to remember which lead is what.
5) If the circuit was to be used by someone else, then I would entertain using a schottky diode, like a 1n5817 on the positive supply lead. There is even a mosfet circuit that gives extra low voltage dropout for polarity protection.
6) If a wall wart is being used, I have seen a bridge circuit I.C. used by the likes of Olimex on their PIC-XX boards.
So in the end, my protection scheme is proportional to the consequences of a goof happening. Others should chime in with there experiences and practices.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks guys, very useful information. I figured something like this would be the case since there tends to be lots of components on an arduino or stamp. I have a bench-top adjustable regulated power supply and a small bread board, I plugged the leads to VDD and VSS directly just to get things going and make sure all the pieces worked well together. Next time I go to play around with it Ill be sure to study the spec sheet and wire my power supply to the breadboard in a more permanent manner, using the provided rails and 0.1uF etc.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Forgot that you have a Pickit 2 clone. Just use the target Vdd by selecting it from the Pickit menu. The Pickit software will automatically set the voltage for the chip being used, as long as the device is recognized. There is a 100ma load limit, which is plenty for most projects.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Introduction:
Hello all, what a great support community we have going here. I am brand new to all of this, programming PICs, using GCB to code, etc. I do have 4 years of electronics experience from high school so I have enough electrical theory to get me by, just never wrote code straight to a PIC ever.
I have a sleeve of 12F683 which I will be burning with a PICkit 2 clone board. (just the USB board, I seem to be missing the programmer 2 go module). I have everything connected up, and talking to each other; I wrote my first working program last night:
This tells me I have everything working properly, my LED is blinking at roughly 0.5 second intervals.
My only real question so far is if I can plug the PIC straight into my power supply at 4.5 volts or should I be limiting current with a resistor, or possibly filtering with a cap or diode or something to protect the chip? My only other experience programming a PIC was with a BASIC Stamp, which fully supports the pic. Now that I am using stand alone PICs, I want to be sure I wont destroy them all before I get to do something useful with them!
Thanks for taking the time to read through my introduction. Ill post what I intend to do next in a follow up post to keep things clear and concise. Have a great day!
1) Always use a 0.1uf cap across the Vdd and Vss pins of the micro.
2) If there are higher load demands of the circuit like a servo, or IR distance sensor, then add 10uf-100uf filter cap. Check the devices data sheet for specific recommendations.
3) When breadboarding a project I tend to live dangerously, battery leads a flying. Of course I have paid the price with a few popped I.C.'s over the years.
4) When I graduate to a proto or circuit board then I like using polarized connectors, so I don't have to remember which lead is what.
5) If the circuit was to be used by someone else, then I would entertain using a schottky diode, like a 1n5817 on the positive supply lead. There is even a mosfet circuit that gives extra low voltage dropout for polarity protection.
6) If a wall wart is being used, I have seen a bridge circuit I.C. used by the likes of Olimex on their PIC-XX boards.
So in the end, my protection scheme is proportional to the consequences of a goof happening. Others should chime in with there experiences and practices.
A better idea would be to run your pic off its own power supply:
Use a 7805 5v regulator with a 0.1 so you can run it at up to 24v etc
Thanks guys, very useful information. I figured something like this would be the case since there tends to be lots of components on an arduino or stamp. I have a bench-top adjustable regulated power supply and a small bread board, I plugged the leads to VDD and VSS directly just to get things going and make sure all the pieces worked well together. Next time I go to play around with it Ill be sure to study the spec sheet and wire my power supply to the breadboard in a more permanent manner, using the provided rails and 0.1uF etc.
Forgot that you have a Pickit 2 clone. Just use the target Vdd by selecting it from the Pickit menu. The Pickit software will automatically set the voltage for the chip being used, as long as the device is recognized. There is a 100ma load limit, which is plenty for most projects.