![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| PIC Programing / Design Discuss programing of PIC chips here and design of electronics using PIC chips. |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
A friend and I were trying to do some very basic things with a couple of 18f452 PICs, like make an LED flash etc and we are now stuck. We programmed it with a simple loop program that turns a port on and off (to make an LED on one of the port's pins flash) and connected a 20MHz resonator with two 22pF capacitors for the oscillator circuit, across OSC1 and 2. Our power source is about 5V but probably has about 2V error. The first time we tried it, it worked perfectly. But after that every single thing we've done including using the same LED program has resulted in failure. The programmer software has stuff about fuses and as we are new to PICs and applied electronics generally we have no idea what to do. If someone could explain how durable PICs are and how badly they respond to static, varying voltages, anything else that us newbies should be looking out for, we will be seriously grateful! So far its been really frustrating. Thanks! |
|
#2
| ||||
| ||||
| You have to watch out for alot of the PIC series RA4 is an open-collector output, which means it can SINK current, but not source it, and RA5 is input only. Also 2v variation on your supply is too much, you should really use a regulated supply from a 7805 or similar. Al.
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) Last edited by Al_The_Man; 07-14-2005 at 07:20 PM. |
|
#4
| |||
| |||
| you may want to purchace some of the cheap 8 pin pics to play with untill you get familiar with there general opperation. if they fry ... well its no biggie , to transfer the code into bigger ones is a simple task, and they are always handy to have around to stick in small places. attached is a general setup. THANKS . and Sorry ... didn't notice the + and - were reversed on the attachment . this attachment is correct. Last edited by smarbaga; 07-14-2005 at 08:18 PM. Reason: mistake |
|
#5
| |||
| |||
| NO NO NO big time! smarbaga, Vdd and Vss are reversed on your attached PIC. Please correct it, before people get confused! Vdd is +5V Vss is 0V How to fry a PIC in 5 sec: * Reverse Vdd and Vss * Exceed absolute maximum voltage (found in datasheet) * Ground pins that are set to be high(+5V) and outputs. Default (at boot) is input on most PIC's. |
| Sponsored Links |
|
#7
| |||
| |||
I don't understand what you mean about ground pins in the first sentence, could you please explain? And as I asked before, are pics that sensitive to static from touch? Do I REALLY have to wear some sort of antistatic device while handlign them? |
|
#8
| |||
| |||
| One of your first projects should be something like blinking a led. In order to accomplish this, the pin used to do this has to be made an output, so it can shift state from hi (+5V) to low (0V = ground = GND etc etc) and reversed. If the program sets an ouput pin high (+5V), and it is directly connected to 0V, a LARGE current will flow inside the PIC (from +5V side to 0V), which in turn generate so much heat locally that the PIC eventally will be destroyed. This of course applies to the reversed condition (output connnected to +5V and pin set low = 0V) Regarding static issues - in the real world, among hobbyists, my guess is most people never even seen a antistatic bracelet. But don´t get me wrong, static will kill PIC, just use common sense and keep your PIC away from static things such as your cat, carpets and so on and you will be fine. Verify your PIC after you program it. Spouradic errors, which never used to occur in the past, means the PIC is on its way. |
|
#9
| ||||
| ||||
| Make sure all your connections to the pic are good if it worked then your program has been downloaded correct look at if it is a 16f84 look at vss vcc and mclear line make sure there is 5 volts on mclear and vcc make sure vss is grounded as far as static it is important probably not your problem at this point dont touch the pins make sure you are not wearing any type clothing to contribute to static charge there are cheap meters at rshack that have freq on them us on of these to check the oscillator also if it is set up for internal or external osc and the fuses need to left alone when you burn a fuse this is to code protect I did it the first time but does not mess up chip just cant read program or reprogram I am just a hobbiest been messing with pics for 4 years. hope this helps |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mazak 8G M/C,mazatrol eia-t, z axis stuck | imwllc | Mazak, Mitsubishi, Mazatrol | 7 | 09-07-2009 11:48 AM |
| VFD installation with pics | Swede | Phase Converters and VFD | 36 | 12-06-2006 06:21 PM |
| Some pics from my fun-fly | CNCadmin | CNCzone Club House | 12 | 08-09-2004 08:48 AM |
| 7TH Sojourn pics please | wedge | DIY-CNC Router Table Machines | 9 | 06-13-2004 01:37 PM |