Jump to content

PIC Project


ed84c

Recommended Posts

I have planned an electronic data logger for my car based around PIC16F84(A) (cheap & have found a circuit diagram for a PIC programmer i can build for it).

 

Here it is;

 

errata2_8.gif

 

Just wondering if any of you had any idea;

 

i) On programming the chip (using a C compiler) to make it to do what i want it to do (as described below).

ii) How to wire up a pic chip once it has been programmed.

 

The Flow chart is attatched;

 

4 Sensors (thermistors etc) give an analogue voltage to an individual input on the PIC. The PIC (i hope) has ADC capacities and converts this voltage into an 8 bit binary value.

 

The 5th sensor is a (de bounced) reed switch, which gives a high per fan resolution, and somehow (maybe using a shift register) this needs to be converted into a binary value; maybe the sum of highs is stored and sampled on a regular clock cycle.

 

Now another 8 bits needs to be appended (bearing in mind this is an 8 bit chip), so that when each data byte is multiplexed along the serial cable into the computer, the programme on the computer, knows which sensor data the following byte will be.

 

Anybody got any suggestions on wiring/ coding this?

 

Cheers

Ed

 

(A VB programme will be written to display graphically the incomming data.... Yes I know.)

Car Data Logger.JPG

Link to comment
Share on other sites

Hey, interesting project. I had a similar project a few years back and came to a few conclusions.

 

for i) I couldn't find a freeware C compiler anywhere on the web...even a BASIC compiler would have done. So instead I had to use the assembly compiler by Microchip. Its not that bad...you have to be resolved to making your own system for 'functions'. ie where in memory do you store parameters, in what order, and where the returns values go. Also, coding in assembly is MUCH easier when you're not using interrupts. I don't know if this PIC supports that.

 

ii) can't help you much for this as its different for each situation.

 

Just a general warning, a few people I know tried to make a PIC programmer of the net and though some were successful, a few just fried their microcontrollers.

Link to comment
Share on other sites

OOOooo nice, you made the thread :D

 

Will you be posting some pictures etc of some of the various stages of build / work?

 

Could you post some information on where you are buying the kit from and what other kit you might be using etc (for anyone who might be looking at getting into electronics)

Link to comment
Share on other sites

Indeed I will. :D

 

Im buying most of the components from http://www.rapidelectronics.co.uk, this is because im doing 2 projects the other is a power amp for my car/mp3 player and maplin dont sell high power p-channel mosfets for some bizarre reason.

 

I am however buying some strip board from maplin tommorow.

 

Here is the schematic for the power amp;

Power_Amp.JPG

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

Free C compilers can be found at download.com.

 

Go to Developer Tools -> Tools and Editors -> Compilers and Interpreters. Then, search for "C" in "Compilers and Interpreters" (it's all a function of the search thing), filter the licenses to "Free", and there you have it.

Link to comment
Share on other sites

  • 3 weeks later...

Hi there,

 

I have collected a few sites for you to check.

 

1. Pic programmer from Cheap to Expanded using parallel port: http://www.rentron.com/Myke4.htm

 

2. PIC programmers with software too: http://www.coolcircuit.com/project/picprog/

 

 

Now looking at your PIC; I dont think PIC16F84A has any inbuilt ADC. Check here at MicroChips Website

 

Notice that you can even consider, PIC16F72 and PIC16F77 as both have 8bit 8 ADC channels. (you know, 8 inputs from analog sources giving an 8bit output)

 

 

======================================================

Ok, if you are just thinking of logging in your data "directly' to a PC then you can connect the ADC to a mux and feed in to your laptop/PC.

 

For which the design has to be thought out. for example:

 

Core engine temp -> ADC -> serial-input to parallel port/serial port of PC

 

The ADC which can be used is a serial one.

 

ADC0838: 8 channel - serial out to PC

ADC0834: 4 channel - serial out to PC

ADC0832: 2 channel - serial out to PC

 

Have fun designing! :)

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.