![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Ok now i am dead serious about buying a PIC and a programmer. I need to jump on the PIC bandwagon now because i have only experience with the costly 112pin motorola processor which is ridiculous for small projects.. Ok i have a few questions. First of all. 1) what site can i buy the cheapest, programmer board? 2) what do each of these things mean e.g 16F648A I assume 16 means 16 i/o what does the 64 mean and what about the 8A. 3) How do i know if what i am gettting is "One time programmable"or 1,000,000 time programamble? 4) lets say i need 30 pins for my project and i have 2 16 pins pics can i hook up the 2 pics to in effect have 32 pins? 5) There are tons of different PICs, which should i get? i guess it makes sence to buy a bunch of them. 6) My previous processor had input capture/ output compare capability. Do PICs have this capability? I checked micropics site and didnt see mention of this. I want a PIC with this capability. 7) Do Pics have preassigned functions like Reset, interrupts in memory? 8) Why do i always hear about people using crystal clocks. isnt the crystal built inside the Pics? 9) Are the instructions the same for all Pics? 10) In Nigel's site. Is that software the assembler? where do i find the software that assembles the code and gets it ready for burning? 11) Most importantly where can i find a good, cheap programmer. Is it cheaper/ too hard to build my own? thanks a lot. Nigel you are the man. lets go cubbies. | |
| |
| | (permalink) | |||||||||||
| Quote:
However, you should be able to buy a kit for the P16PRO40 pretty well anywhere, and various sites will post anywhere in the world. Quote:
Quote:
Quote:
Quote:
There are basically three ranges of PIC's, the 12 bit (12 series), 14 bit (16 series), and 16 bit (18 series) - I would advice you start on the 16 series (14 bit) as I suggested above - most code is written for this series, as are my tutorials. Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
If you're in the UK, try Quasar Electronics. | ||||||||||||
| |
| | (permalink) | |
| Quote:
4) Just get the pins you need in one part. Interfacing two microcontrollers is possible, and is done all the time, but you only do it if you have a real need. There are parts in non-DIP pkgs with far greater than 40 pins. 5) There are only a few universally "desirable" parts off of each PIC line. There are some with reduced memory or just plain obsolete that make no sense to get unless you want to work with an old design or save 15 cents. The PIC18F252/PIC18F452 are the popular and well understood ones off the PIC18 line. Be sure to check the errata sheets for the part you're looking at, a few are nasty! 7) The internal oscillator, for the PICs which have them, does not use the full speed of the part that you could get with an external source (usually a crystal). Internal osc also varies a lot in frequency with temp and part to part. But it's handy if you can deal with that and need the pins for other things. 11) I like the Warp13 programmer myself. A bit more cost, but very well featured: http://www.newfoundelectronics.com/ | ||
| |
| | (permalink) |
| Thank you Nigel and Oz. That was very informative. I guess what i meant by input capture, is the capability to count pulses. IR recievers give off pulses. Output compare is used mainly as a timer, but it can also be used to create a pulse at any frequency you want up to about 50khz. I am guessing in the PIc i probably have to manually do this by creating a loop with h/L with a small delay in there. anyways thanks a lot. Texas here. | |
| |
| | (permalink) |
| I'm in Austin, Tx myself. The PICs have a lot of different input capabilities, which may or may not be present on your model. It sounds like your IR rcvr is a digital 0-5V input and a comparator has no useful function here. Possibilities include: 1. The signal can create an interrupt 2. The signal can be used on the capture input, which will get you a copy of a counter value when the edge occurred. 3. You can simply read the signal. Compare it to a hardware counter, number of counter interrupts, or number of delay loops. Lots of options. One thing about the PIC, you can rarely call it short of features! | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| Hey guys do you see anything wrong with this programmer? It seems really cheap and do you think this is trustworthy? http://cgi.ebay.com/ws/eBayISAPI.dll...sPageName=WDVW thanks | |
| |
| | (permalink) |
| I have two friends who have recently ordered that exact Olimex PIC programmer. You need to get a serial cable to go with it. I believe that it is also possible to plug the unit straight into the serial port, but you may need to fiddle with it. I'd recommend normally using a serial cable though. It's not exactly a USB dongle... :? Anyway, onto its operation. Does it work? Yes, yes in fact it does, but there are cases where it does not. The thing is, it's not guaranteed to work, because it does not use an external power supply. It is powered directly from the serial port. It relies on the serial port being above specs in order to achieve sufficient power to program the PIC. Some laptops can't provide enough power through the serial port to function correctly. My friends and I have used the IC-Prog software and two Olimex programmers on an IBM Thinkpad laptop with Win 98, a Compaq laptop with Win XP, and a Sony Vaio laptop with Win XP. The odd thing is that with the IBM/Win98, the LED comes on while programming, as it should. On the two computers with Win XP, the light does not come on, even though it does program the PICs correctly. If using Windows NT / 2000 / XP, you have to install an additional driver for the ICPROG program. It's not hard at all, but it took me about half an hour to figure out why it wasnt working. :P Some upsides: *It's small, *cheap, *and gets the job done. Some downsides: *It's s-l-o-w. The more program store a chip has, the longer you wait for it to program. *You have to unplug it from the serial port before inserting or removing a chip so the comp's power doesn't fry it. I think that's a pretty accurate and unbiased write-up about it. Onto my subjective opinion. I don't like it. I have a parallel programmer, with an external power supply, and a nice ZIF socket. It programs fast and reliable every time. It's done in a few seconds. There's no wondering if it programmed. There's no worrying if there's a problem with the code, the programmer, or the PIC. Some people use the Warp 13 programmer. I like the Epic Plus from www.melabs.com. It will set you back some cash. But when I started out, it was acceptable for me, having a programmer I knew would work no matter what. With this Olimex offering, you don't have any of that. You have a slow slow progress bar that crawls across the screen, and then at the agonizing end of the programming process, you get a generic operation failed box. Yeah, that's about as descriptive as it gets. No clues as to what the problem is. To sum up this long entry, basically you can either get a more expensive one and know that it works and not worry about it, or you can get this one pretty cheaply, and have a pretty good idea that it will work. But you will have to invest some time into figuring out any quirks that arise, and you will have some arise. :twisted: | |
| |
| | (permalink) |
| Thank you, I just bought it. I was wondering. Now after i program my first chip. When i place the chip on my breadboard with led's or whatever. What else do i need besides a 5 Volts and ground source? I need an external crystal and what else??? Is that all that i need to get started? | |
| |
| | (permalink) |
| Depends on what chip you are using. Lots of people say start with a 16F628. I haven't used that one yet, but I plan to tomorrow. For the clock pulse, there are multiple options. You can use a resistor and capacitor, or a crystal, or a ceramic resonator. If you use RC timing, it won't be very accurate, so go with a crystal or a resonator. If you use a crystal, then you will need two capacitors, around 18 to 22 picofarad (pF) connected to the pins of the crystal and ground. See the PIC datasheet for more info on the timing and connections. A resonator is a bit simpler, as the capacitors are built in. The resonator has 3 pins. Connect one of the outer pins to OSC1, connect the other outer pin to OSC2, and then connect the center pin to ground. I would recommend getting your parts, like the crystal + caps or the resonator (try 4 MHz), from www.glitchbuster.com Connect your LED and current limiting resistor to one of the PORTA or PORTB pins, and make it do stuff. 8) | |
| |
| | (permalink) | |
| Quote:
I would suggest you look at my tutorials, it will give you everything you need - including veroboard layouts. I also suggest you DON'T buy the JDM stye programmer you were looking at, they are too unreliable - get a parallel port one, as before I recommend the P16PRO40 which is one of the best, and still nice and cheap. You can run it from my free software, or ICProg which is also free. Try looking up kit number 3096 at http://www.quasarelectronics.co.uk/ for a suitable kit at only £10.17+VAT. | ||
| |
| | (permalink) |
| Can't recommend this programmer enough. I have one and i have never regretted buying it. Programs all flash pics. USB. http://www.dontronics.com/diyk128.html --JB | |
| |
| | (permalink) |
| I just bought an assembled P16PRO40 from amazon for 25 dollars. Not bad and it comes with a 40 pin ZIF. I was wondering, on the amazon site it says for it to use full capabilites you have to register it for $15.00? Is Nigel's free ICPROG software a replacement for that software that they are asking me to buy? | |
| |
| | (permalink) | |
| Quote:
ICPROG is a different software. u can use both ICPROG and WinPicProg with the P16PRO40 hardware. but u will have to make a little bit of adjustments on the software side. yay i got a new avatar!!!!!!!! its cute isnt it | ||
| |
| | (permalink) |
| Hey i was thinking about buying the 16F628 as some people recommended. but check this out {16F628-20/P 20MHz, 18-DIP, 2K Flash, 4 MHz internal osc. $2.74} I guess whenever i see internal osc that means it does not need an external one. But this means if i use an external one, It will run the program at 20Mhz instead of 4Mhz? That seems like a big difference. Is it right to assume that PIC instructions for the most part are about 1.5 clock cycles per instruction on avg? The last micro i was using was more like 3 cc/instruction @8Mhz. Since my project will be highly time sensitive. Which processor would be the best one for this. maybe has 2-3 timer interrupts and also maybe the max amount of Mhz @ the cheapest price. So that means if i want to get the 16F628 just for practice first but i want it at 20Mhz, then just buy any crystal that says 20MHz? and the 2 capacitors? thanks | |
| |