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.

A tone for my Pic18 game... Help?

Status
Not open for further replies.

milz

New Member
Hello there.. im new here... hope im not double posting..
Im building my first pic project for my micro-controllers course.. a 1-D ping pong game .. using the pic18f452
Anyhow.. i need to put some tones using a frequency generator (CCP1).. and i know how to do so.. but can someone help me find melodies in frequency?!..
like RTTL or sumthin i dunno... :confused:
Any melody would be fine... just DONT throw britney spears tracks at me.. :D
 
This is for the 16F series, but you may find it helpful?, I've used it on a 16F628 and it works fine (I actually dis-assembled the HEX file and modified it in assembler, as I don't do C).



Just remembered! - I also used it on a 12F675, makes a nice little 8 pin 'tune playing' chip, and I altered the code to use the internal 4MHz oscillator.
 
i already checked the page u gave me and didnt do anythin for me as i dont do C neither... BUT...
Dis-assembled?... this thing really exists? :p .. can u lead me to a good disassembler plz?... does MPlab include one?!
 
milz said:
i already checked the page u gave me and didnt do anythin for me as i dont do C neither... BUT...
Dis-assembled?... this thing really exists? :p .. can u lead me to a good disassembler plz?... does MPlab include one?!

MPLAB does (apparently) contain a simple dis-assembler, but I use my programmer software WinPicProg which works rather better.

If I can find the assembler code tonight at home I'll post it for you!.
 
Nigel Goodwin said:
If I can find the assembler code tonight at home I'll post it for you!.

OK, I couldn't find my original source, it's on an old hard drive which isn't connnected at the moment - but I've run the HEX file through my dis-assembler, and here's the assembler it produces.

This is just as the disassembler creates it, it should assemble fine with MPASM, the versions I modified previously were tidied up (C produces pretty horrible assembler!) and commented.
 

Attachments

  • ringtone.zip
    2.8 KB · Views: 130
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top