Page 1 of 1

IR theremin

Posted: Wed May 16, 2012 1:24 pm
by haz
IR Theremin coding problem.

hello sir... i have a problem with the coding.
i dont know how to find, create coding, find the source & others for this library

1. p18f452.h
2. timers.h
3. delays.h
4. adc.h
5. math.h

i'm also have google for above coding. i'm really noob about the coding. i hope u can share or teach me...

Re: IR theremin

Posted: Wed May 16, 2012 10:34 pm
by ThePyroElectro
Hi Haz,

When developing software for the PIC 18F452, typically you will use the MPLAB IDE ( http://www.microchip.com/mplabx/ ) and I used the C18 C compiler for PICs ( C18 Compiler Free Download ). After installing these two, you should be able to compile the program in MPLAB.

If you get confused, this tutorial:
http://www.pyroelectro.com/tutorials/pickit3_mplabx/
Should help you get everything installed/compiled/programmed.

Good luck!

Re: IR theremin

Posted: Fri May 18, 2012 6:05 pm
by haz
pic18f4431 is a same function with pic18f452? And If we choose pic18f4431, what pic HEADER file can we use? have problem to combine all library... Please help us sir.... Tq...

Re: IR theremin

Posted: Sun May 20, 2012 2:07 am
by ThePyroElectro
Hi Haz,

The include file for 18f452 is p18f452.h, the .h files you are looking at are for a different PIC device.

Code: Select all

#include <p18f452.h>


If you choose pic18f4431, then you will need to use p18f4431.h -- you will likely have to change some other things in the software if you choose to use this different pic. I'm not as familiar with 18F4431, so I'm not sure exactly what changes will need to be made.

Code: Select all

#include <p18f4431.h>

Re: IR theremin

Posted: Sat May 26, 2012 9:15 am
by haz
sir.. we have contructed the circuit same with the schematic & burn the giving coding to PIC 18f452. But the circuit doesn't work... only 1 LED (power supply) turn on. the 2 Blue LED & sensor doesnt working... the coding your giving us is a complete coding or not sir? plz help us sir. (all the header coding we found it, & compile, & it succeded, but the circuit doesnt working right now)

Re: IR theremin

Posted: Wed May 30, 2012 12:16 am
by ThePyroElectro
haz wrote:sir.. we have contructed the circuit same with the schematic & burn the giving coding to PIC 18f452. But the circuit doesn't work... only 1 LED (power supply) turn on. the 2 Blue LED & sensor doesnt working... the coding your giving us is a complete coding or not sir? plz help us sir. (all the header coding we found it, & compile, & it succeded, but the circuit doesnt working right now)


You might need to add this under your header:

Code: Select all

#pragma config OSC       = HS
#pragma config WDT      = OFF
#pragma config LVP      = OFF


The code on the website is what I used for that project. If you're having trouble getting it to work, then start small and test single sections of the code and see if they work, like LEDs code first, then tone generation code, then sensor A-to-D code.

Good luck.