IR theremin

Off-topic Or Otherwise...Say/Ask It Here
haz
Newbie Pyro
Posts: 3
Joined: Wed May 16, 2012 1:08 pm

IR theremin

Postby haz » Wed May 16, 2012 1:24 pm

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...
Attachments
1.png
1.png (187.03 KiB) Viewed 7265 times

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: IR theremin

Postby ThePyroElectro » Wed May 16, 2012 10:34 pm

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!

haz
Newbie Pyro
Posts: 3
Joined: Wed May 16, 2012 1:08 pm

Re: IR theremin

Postby haz » Fri May 18, 2012 6:05 pm

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...
Attachments
222222.png
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...
222222.png (121.98 KiB) Viewed 7245 times

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: IR theremin

Postby ThePyroElectro » Sun May 20, 2012 2:07 am

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>

haz
Newbie Pyro
Posts: 3
Joined: Wed May 16, 2012 1:08 pm

Re: IR theremin

Postby haz » Sat May 26, 2012 9:15 am

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)

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: IR theremin

Postby ThePyroElectro » Wed May 30, 2012 12:16 am

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.


Return to “Put'm Here”

Who is online

Users browsing this forum: No registered users and 2 guests