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.

Programming a PIC 16F627 for a electronic piano

Status
Not open for further replies.

alifred

Member
Hi,

I want to make an electronic piano with a PIC16F627.
If someone could help me write some code for it then I would appreciate the help!

What I want:

I have a 32.768kHz crystal oscillator that I want to use as a frequency generator.
RB0-RB6 are the notes CDEFGAandB with respective frequencies 262,294,330,349,392,440,494.
Then when RB7 is held high and kept high, the notes to go up an octave to respective frequencies 524,588,660,698,784,880,988 (just double the previous ones!)

If anyone could help me with this then I will be very HAPPY!!!:)

I have had some limited experience with PIC's before (programming and compiling them etc.) but not the writing of any code. I can compile any code that you might give me.

Thanks

Fred
 
Hi,
I don't have PICBASIC Pro unfortunately, and it costs quite a lot!

Anyone got any ideas on some code?

Thanks

Fred
 
I am do not know any code for PIC's and I don't have any experience with writing code.

If someone could start me off with one frequency, then I could maybe have a go with some other frequencies.

Thanks

Fred
 
I would suggest you start with something simple like flashing an LED. PICBASIC Pros manual has plenty of examples and so does the BASIC Stamp manual (PICBASIC Pro compatible). There should be a section on music generation.
 
Just download and install gcbasic it has documents in word form+ tutorial for bigner plus piano example if u still require code i will write for u
 
Hi saeediqkw

Thanks for your reply.

Could you possibly write the code for one note and tell me how to change it up an octave with a button (possibly program it automatically double the frequency?) and then tell me what to change to change the frequencies.

Cheers

Fred
 
The answer you are looking for requires someone writing the code for you. This can take up to a few hours depending on complexity. I strongly recommend to grab a PIC manual and see how it works. Read some tutorials if you wish. Back in the day i banged my head on my desk quite a lot figuring out registers, options, intrerrupts, A/D conversions, etc. trying to make simple programs.

Good luck.
 
Hi,

I want to make an electronic piano with a PIC16F627.
If someone could help me write some code for it then I would appreciate the help!

Hello!

This is not quite your requirements, but I think it should be interesting for you:
Piano on PIC16F88
8 sound channels and 36 touch keys on PIC16F88. Video, description and source codes included.

Best regards, Victor
 
Thanks for that - I have currently put the project on a back burner so to speak. School exams are quite time consuming!

I will hopefully continue with the project in a couple of weeks.

Thanks anyway - very helpful

Fred
 
Hey,

BeeBop - it seems to be fine for me using AVG and Norton 2009
Nigel - Thanks very much! I also agree that that video is very impressive!

Thanks for everyones help!

Fred
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top