Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Communicating a PIC with PC

Status
Not open for further replies.

xilmarillon

Newbie level 4
Joined
Sep 6, 2009
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Türkiye
Activity points
1,321
I'm curious about an issue.I need to connect a photocell device to my computer via it's serial port.I'm thinking of creating a pic circuit (I need to find an appropriate crystal that would match serial port's baudrate) to get data from photocell and send it to Matlab via the serial port COM3.Matlab has reading and writing capabilities through computer's serial ports by the way.Can I send any digital data - like output of a photocell device- to PC via it's serial port(COM) by just adjusting the appropriate baudrate with the crystal of usage?
 

You don't need a crystal having a specific frequency for communicating via serial port. A 4Mhz or 20Mhz crystal will do, as long as you adjust the values in the baud rate generator registers of the PIC accordingly.

You need to use an ADC for converting the output of the photocell to a digital value (if the PIC you're using doesn't have one of course)

The other thing you need is a level shifter like MAX232 to convert the voltage levels between the PIC and the serial port of your PC.

The crystal has nothing to do with the thing you want to accomplish.
 

If you can get the MAX233 will be better since it has the capacitors built-in and this reduces the number of components and the pcb design.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top