How to connect PIC like 12F675 with a PC?

Thread Starter

nutcrack

Joined Dec 25, 2005
8
Season's greetings to all and hello from Virginia,

I'm a totally newbie in electronics, so, bear with me. Say, I have a PIC like 12F675 embeded on a tiny board, and this chip has two sets of text data and I'd like them to be able to connect to a computer (so that the data can be read/edited/deleted). It seems some sort of USB IO chip or pin might be needed. Is that correct? What is a simple way to make it happen? Also, inexpense, inexpense!

Thanks.

Don
 

n9352527

Joined Oct 14, 2005
1,198
Serial port is a cheaper and easier option. You would need a serial chip driver like max232 and implement the protocol in software.
 

Thread Starter

nutcrack

Joined Dec 25, 2005
8
Thanks. Any sample code or the like for "implement the protocol in software."?

Originally posted by n9352527@Dec 25 2005, 07:20 PM
Serial port is a cheaper and easier option. You would need a serial chip driver like max232 and implement the protocol in software.
[post=12678]Quoted post[/post]​
 

n9352527

Joined Oct 14, 2005
1,198
Originally posted by nutcrack@Dec 26 2005, 05:12 PM
Thanks. Any sample code or the like for "implement the protocol in software."?
[post=12688]Quoted post[/post]​
Have a look in Microchip website, they have application notes for serial implementation on various PIC families.
 

Thread Starter

nutcrack

Joined Dec 25, 2005
8
Thanks. Will do.

Originally posted by n9352527@Dec 26 2005, 02:54 PM
Have a look in Microchip website, they have application notes for serial implementation on various PIC families.
[post=12696]Quoted post[/post]​
 

Thread Starter

nutcrack

Joined Dec 25, 2005
8
Very informative, I appreciate it. Question, this appnot talked about PIC16CXXX microcontrollers family's connection to RS-232 port, but for PIC12F675, it should be OK as well, right?
Sorry, the digikey's url should be
http://www.digikey.com/scripts/DkSearch/dk...US&Cat=32769058

Thank you very much.

Originally posted by n9352527@Dec 28 2005, 12:15 PM
I can't open the Digikey part, but it should be an IC Maxim MAX232. Have a look at the app note below, it has a schematic diagram and software routine for 16 series PIC for a design idea and parts that you'd need.

http://ww1.microchip.com/downloads/en/AppNotes/00555c.pdf
[post=12735]Quoted post[/post]​
 

n9352527

Joined Oct 14, 2005
1,198
The Digikey link still doesn't work. You just have to adjust things that are different between the 16 and 12 families (freq, ports, addresses, etc.). Have a look at both families datasheets and compare the features that are used to find the differences.
 

Thread Starter

nutcrack

Joined Dec 25, 2005
8
OK. Thank you very much. Now, so, it seems that one communiation method between a microcontroller and a PC or the like is via RS-232 protocol, the max232 is a little connector that sits between a microcontroller and a PC and their communication is faciliated via a piece of software (easier to reside inside PC). Yes? Technically.

Originally posted by n9352527@Dec 28 2005, 02:29 PM
The Digikey link still doesn't work. You just have to adjust things that are different between the 16 and 12 families (freq, ports, addresses, etc.). Have a look at both families datasheets and compare the features that are used to find the differences.
[post=12740]Quoted post[/post]​
 

Gadget

Joined Jan 10, 2006
614
If you want a cheap , easy micro, try the PICAXE series. They require no more than a 5v supply, and a couple of resistors to connect to the serial port of a PC, and the programming is in BASIC..(like the basic stamp), with Free software.
The chips are only a few bucks each, and easily debugged and reprogrammed. Not as fast or versitile as a PIC however, but very quick and easy.
goto picaxe.co.uk to find out more.
 

BeeBop

Joined Apr 25, 2006
17
OK. Thank you very much. Now, so, it seems that one communiation method between a microcontroller and a PC or the like is via RS-232 protocol, the max232 is a little connector that sits between a microcontroller and a PC and their communication is faciliated via a piece of software (easier to reside inside PC). Yes? Technically.
The max232 is a converter chip. It converts TTL levels of 0 to 5v to rs232 levels of ~-12 to 12v. There are different versions of the max chip, which require different capacitors. The cheap 232 chip use large electolytics, while the more expensive ones use mono 104 caps. There is also a max233 chip which needs no external caps, but that costs more.
You can also do this with a pair of FETs. See this here:
http://www.electro-tech-online.com/attachments/micro-controllers/7923-rs-232-pic-stepper-motor-interface-rs232-circuit-12f683.jpg?d=1146858636
Here is a link to the thread which talks about it:
http://www.electro-tech-online.com/micro-controllers/21267-rs-232-pic-stepper-motor-interface.html?highlight=2n7000+rs232

The connector is a DB9, and THAT goes between your max232 and the PC.

The software on the PC side is Hypertem, or you could write your own with VB, or ...
You will also have to set up a software UART on your PIC, to communicate.
 
Top