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...
Any melody would be fine... just DONT throw britney spears tracks at me..
 
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? .. 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? .. 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: 131
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…