Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Inexperience, Blur and Not so Sure

Status
Not open for further replies.

holobean

New Member
Erm, okey im doing my year 2 project, and i was never taught PIC and programming it. its a 3.5 months project, and Im only left with less then 3 months to go. Ive finish my most of my circuit part. Well there is something im still not sure tho maybe its because i have no experince in programming a pic. okey now i understand u can program the PIC to control the output according to the input right? So lets say i want to show the condition of the output from the pic like say for example "Circuit A is ON" through the computer, how is this possible? in other words how do u interface with the computer. One more thing, lets say i want turn on a circuit from the computer o say controlling it from the computer, do i do it thru a pic or what?
 
Pic

You need a piece of hardware called a programmer to program a PIC chip as well as software to compile the code and interface your PC with the programmer.

To interface with a computer you need to figure out how to use the UART serial port on the PIC chip and then figure out the PC's serial protocals. You then need to write software for the PC that can control the serial port and communicate with the PIC (which I have never done so you will have to ask someone elses). Of course, you also need to write the corresponding software for the PIC but that comes with understanding how the PIC serial port works.

You need to read the PIC manual and understand the chip, as well as studying up on how UART works.

I am just wondering, if you only need to indicate if a circuit is on, can't you just use an LED or something?
 
dknguyen said:
You need a piece of hardware called a programmer to program a PIC chip as well as software to compile the code and interface your PC with the programmer.

To interface with a computer you need to figure out how to use the UART serial port on the PIC chip and then figure out the PC's serial protocals. You then need to write software for the PC that can control the serial port and communicate with the PIC (which I have never done so you will have to ask someone elses). Of course, you also need to write the corresponding software for the PIC but that comes with understanding how the PIC serial port works.

You need to read the PIC manual and understand the chip, as well as studying up on how UART works.

I am just wondering, if you only need to indicate if a circuit is on, can't you just use an LED or something?

thanks for the reply.. now i know how to start atleast.. well my project is a whole system... its not to indicate if the circuit is on actually.. im suppose to like control everything thru a system.. so lets say since my circuit consist of controlling the motor to vary the water pool wave generation. so i need to indicate in return what kind of wave it is now whether its big wave, surfing wave, baby wave and etc. my project involves field from electrical and electronic, manufacturing, mechanical and civil.. so.. my project is just a replica of the Japan Indoor Beach.. my part is to make a whole system where it can close the roof when it detects rain, or by the press of button on the comp i can close the roof, as well as generating 2 types of artificial wave by means of wind and water presure and i can select the kind of wave i wish to generate thru the computer.
 
Manuals

Well, pick the PIC chip you want to use. If it has "ISCP" (in-circuit serial programming) then you all you have to do is run a few pins straight out to a plug which plugs into a ISCP programmer device which also plugs into your PC(Microchip's is called the ICD2, but it costs some money. It's well worth it if you plan to keep on using PICs though.) You can then use software provided by Microchip:

MPLAB2 IDE (free) + the C or BASIC compiler addon, I forget its exact name (student version).

This will allow you to write code for the PIC and upload it using the ICD2.

Alternatively, you can get a programmer device (or build one) which may be cheaper. In that case you use a socket for the PIC chip and insert the PIC chip into the programmer and upload your code (uploading software is unique to the programmer, you can probably just use Microchip's MPLAB2 + addons for compiling the code. Search for a PIC programmer (and maybe even another PIC compiler in the language that you want) if you want to go this way.

You can also build your own PIC programmer device. Search for programming circuits for the PIC chip you plan to use. I dont know where you get the uploading software if you go this route. Maybe it's provided by other hobbyists who use the programming circuit.

Either way you have to carefully deicde which features you will use on the PIC chip and read over their manual carefully to at least get a gist of what is going on. THen maybe you can figure out the rest as you code.

I do not know anything about PC programming to interface with an external device through the serial port.
 
Status
Not open for further replies.

Latest threads

Back
Top