PIC Programming Help

Thread Starter

Cadague

Joined Mar 29, 2010
12
Hello,

My name is Casey Dague, and I am currently a senior at Jefferson High School in Cedar Rapids. My partner, Trace Minor and I, are working on a design project for a capstone engineering course, engineering design and development, as part of Project Lead the Way.

We are nearing the end of the school year, and need to develop a circuit using the PIC12F675 chip. This circuit will involve the use of a trigger switch, reset switch, a driver and a speaker. We would like to create a program which, when triggered, will initiate a 2 minute countdown. After this countdown, the circuit would begin to give off a tone through the speaker at 2 second intervals at about 1.7kHz. Additionally, we would like to have a reset switch which will stop the time delay/turn off oscillator.

This seems simple, but we have virtually no prior knowledge of microcontrollers. We have the PIC Chip and MPLAB loaded, but we don't have much understanding of the workings of the program.

We need to complete this within the next couple of weeks, so your help is much appreciated.

Thanks
 

BMorse

Joined Sep 26, 2009
2,675
Post the circuit you are using with the pic, this will be necessary in guiding you on how to write the code, we can not help with the code without knowing the hardware first since that is what the code is based on....

What state are you in??
Do you have a programmer for the pic? (as in a Pickit2/3, etc.)

B. Morse
 
Last edited:

retched

Joined Dec 5, 2009
5,207
This shouldn't be too difficult. As bmorse asked, which programmer are you using for the PIC? And have you decided on a language?

Is there a language requirement with the project, like it has to be done with ASM or C?
 

Thread Starter

Cadague

Joined Mar 29, 2010
12
There is no programming language requirement for the project, so which ever language would be easiest to understand would be ideal.

We will be using the pickit 3 programmer.

We had initially developed a circuit using ttl and cmos 555 but decided that the power consumption and size were much too large and that integrating it into one device would be most efficient.
 

retched

Joined Dec 5, 2009
5,207
Wow, cmos 555 is a pretty small draw. What are your consumption requirements?

Is this battery powered or wall-wart plug in type?
 

Thread Starter

Cadague

Joined Mar 29, 2010
12
it is battery operated. with the cmos 555, the main problem was size, not power consumption. We did get fairly good results with the CMOS version. with one chip instead of 3 or 4, and not dealing with capacitors and resistors, the size is considerably lowered.
 
Last edited:

MMcLaren

Joined Feb 14, 2010
861
Casey,

Did you mention the duration of the 1700 Hz tone at 2-second intervals? Do you mean 2-seconds tone "on" and 2-seconds tone "off"?

Mike
 
Hi there,

I am just getting started with a project that is due in 4 weeks interested in learning assembly and C language. There are tons of books on the subject but its hard to tell which is really good. Can you recommend any sources, books etc.

Your help will be appreciated.
 

maxpower097

Joined Feb 20, 2009
816
Not that its a big deal but you may want to change your names you posted. People and data miners collect this stuff and catalog your info. May not be a big deal but I recently started working for the federal gov and was astonished how much info they had on me in their database. Even an email I never gave them. But anyways you don't want too much data on yourself floating around the web unsecured. :)
 

Markd77

Joined Sep 7, 2009
2,806
They are substitutes for other pairs of instructions,
jnz = jump if not zero
jc = jump if carry
jz = jump if zero

You can use them, if you want to know what they compile to check the assembler output.
 

Thread Starter

Cadague

Joined Mar 29, 2010
12
MMcLaren, I would like the circuit to turn on for 2 seconds and off for 2 seconds until reset, or until the circuit times out after 5 minutes.
 
Top