View Full Version : microcontroller thread #2


cato
07-14-06, 05:56 PM
I still have some questions about microcontroller, but I figured the old thread title was not sufficient as I have already bought the board.

well, I bought the board, so how do I know what chips are compatible? the ebayer lists these(scroll down) (http://http://search.ebay.com/pic-microcontroller_W0QQcatrefZC6QQfromZR10QQfsooZ1QQf sopZ3QQftrtZ1QQftrvZ1QQsacatZQ2d1QQsaprchiZQQsaprc loZQQsassZQQsbrsrtZlQQsibeleafcatZ36332) as the compatible pic18 microcontroller, but are there more?

how does one tell? there are slight variations in the pins (more than one use for a pin) but they have the same general format. does it matter if the pins are in the same location, but have different second or third functions?

MetaKron
07-14-06, 10:01 PM
Read the documentation for each chip. Every single chip has pdf documentation on Microchip's site. If they program by any other standard, that's how you find out. I don't think it makes any difference if they do have a second or third function. The alternate functions are active at run-time, not during programming. They don't even exist until the chip actually boots and runs.

leopold99
07-14-06, 11:55 PM
your link takes me to the following page:
http://www.w3.org/Protocols/
which is about internet protocols.

about your question:
the only difference between a breadboard and an actual pc board is that you can rewire your circuit and reposition your components, so my guess is the multifunction will not matter.
you, as the designer, must ensure that incompatible modes of the pic are never implemented. this can be accomplished by logic gates and tying the output to the chip select pin of the pic. that way if an incompatible mode is requested of the pic the logic will deselect the chip.

MetaKron
07-15-06, 12:53 AM
Leopold, it won't work that way. The external logic would have absolutely no way of knowing if an incompatible mode was selected. It wouldn't know that it was wrong.

leopold99
07-15-06, 01:07 AM
Leopold, it won't work that way. The external logic would have absolutely no way of knowing if an incompatible mode was selected. It wouldn't know that it was wrong.
you are wrong metakron, absolutely positivly wrong.

MetaKron
07-15-06, 09:47 AM
No, I am not.

cato
07-15-06, 10:31 AM
lol, stop arguing =]

anyway, here (http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&ih=017&item=270007225742&rd=1&sspagename=STRK%3AMEWN%3AIT&rd=1) is what I tried to link.

I have been looking at the data sheets, and every pic18 (40 PDIP) I looked at had the same basic pin-out, so how would I know if it was not compatable?
here are 3 examples, the first 2 are from the list the ebayer gave, and one is not on the list:
#1 (http://ww1.microchip.com/downloads/en/DeviceDoc/41159d.pdf)
#2 (http://ww1.microchip.com/downloads/en/DeviceDoc/39631a.pdf)
#3 (not on ebayer's list) (http://ww1.microchip.com/downloads/en/DeviceDoc/39625b.pdf)

thanks for your help guys.

leopold99
07-15-06, 11:00 AM
like i have informed blue_uk most (actually all) of my experience is with motorolas 16 bit devices, which of course is 20 year old technology but the basics should still be the same.
i will be able to help you on some things but not all.

metakron
how does a full adder 'know' that it needs to generate a carry?

MetaKron
07-15-06, 11:06 AM
The data sheets for programming PIC microcontrollers go by family of microcontroller, not by part number. There are some differences. Some can be programmed faster than others.

On those three data sheets, compare Chapter 6. They seem to be exactly the same chapter with slight differences in the text formatting and one of them has a very minor typo on the first page. This is the chapter that tells you how to program the chip.

Also, consider using the "LF" types which will work from 2.0 to 5.5 volts instead of about 4.6 to 5.5 volts. Then they can run on two AAA batteries or one lithium battery. Idle is just under 5 microamps, which is 200,000 hours on a 1 amp-hour battery. Sleep is about .1 microamp, which any lithium battery can support for 10 years. One thing that this will save you is the trouble of regulating the output of two lithium batteries down to 5 volts.

Also, make very certain that the chip you use is reprogrammable. A lot of the chips listed on Mouser are OTP, which means one time programmable.

cato
07-15-06, 11:19 AM
ok, thanks. I guess I will just compare pins, and compare the programming section, and if they are the same (or close) I will assume they are compatible with my programmer.