View previous topic :: View next topic |
Author |
Message |
e-nola
Joined: 21 Apr 2006 Posts: 2
|
CPU-PIC interfacing |
Posted: Fri Apr 21, 2006 11:45 am |
|
|
Hi,
For my senior design project, I am attempting to build an automated device testing system. Most of my experience is traditional electrical engineering stuff, so I spoke with a CE professor at the beginning of the semester about what I need from the system (turn devices on/off from computer control, measure voltages on devices and report back to the computer periodically). He suggested I use microcontrollers and more specifically the PIC16F88 as it has a built in ADC and is fairly simple to program. He also suggested I get the PIC C PCM compiler to interface the computer with the RS485 network of microcontrollers. He ended up leaving unexpectedly shortly after I purchased programmer, the compiler and the uC's.
He basically led me to believe what I needed to do was program the uC's themselves in assembly by just setting up the pins as needed and the UART. Then I could use PIC C to create a C program that interfaces with the uC's(I figure through the built in functions like output_high, read_ADC, #USE RS232...). However, after wrestling with it for sometime and recently talking to another microprocessor teacher, I think perhaps I've been on the wrong path.
If i wanted to make a user interface program that talks to the uC's through the serial port, would PIC C be able to do that, or is it actually just to program the PIC's?
Thanks,
~Eric |
|
|
rberek
Joined: 10 Jan 2005 Posts: 207 Location: Ottawa, Canada
|
|
Posted: Fri Apr 21, 2006 11:59 am |
|
|
The compiler will not create a Windows program for you to interface your PC to your hardware. The C code you write is compiled and burned into the microcontroller and will control only the operations of the PIC itself.
You will then have to write a program on the PC, using Visual Basic or Visual C# or something similar, which will talk to the PIC via the PC's serial or USB port and present the information to the user. |
|
|
e-nola
Joined: 21 Apr 2006 Posts: 2
|
|
Posted: Fri Apr 21, 2006 1:16 pm |
|
|
Thanks for setting me straight Rberek.
I knew something wasn't adding up. Too bad I didn't think to get on here and ask that question a month ago. I may try and just use the parallel port with a stand alone ADC for now since the deadline is not but 2 weeks away and it seems somewhat easier. |
|
|
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
RE: |
Posted: Sat Apr 22, 2006 12:32 am |
|
|
Hi,
Standalone systems may need more hardware and software to run, with a microcontroller all you need to do is establish a communication (which is easily done) with the PC....
thanks
arunb |
|
|
|