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.

convertinf Ardunio code to Swordfish basic

Status
Not open for further replies.
I have version 2230 1200
sent email to website but?
I copied and repasted the two codes but still get the same errors. Won't compile AFTER I added a new copy of the tone.bas.
need to figure out a work around
 
I redid entire code on my wife's computer which shows it has version 2.2.3.6 icd 1.2.0.7
it compiles.
Thinking of just doing project code on her computer if the tone.bas module works as planned.
 
Don't know what to tell you. It all works fine for me.
You can install the SE version on your machine too... you can have both versions if you like

Clipboard01.jpg
 
I don't know what to tell you. I have the SE version as well as the full paid version.
Am in process of installing the pickit software on wife's computer.
curious if I put the compiled code on a thumb drive then put it on my computer would work??
just thinking out loud
 
well Houston we have touch down!
I copied both suggested code from post #25 on wife's computer then put it on my computer and now it compiles etc. Using Swordfish 2230 1200
WHY??
Now to look at getting a higher volume. Using the passive buzzer from Ardunio. Maybe an actual speaker as suggested in the Ardunio cook book I have using a 100uf electrolytic cap and a 200-500 ohm pot (page 376 Ardunio cook book
then decipher the code to play melodies.
 
There's an updated Tone library that includes some enhancements to what's been posted here,
like blocking/non-blocking mode, playing arrays of notes, etc

There's also a Ringtone RTTTL player.

It's available under the UserModules wiki page on the Swordfish site at: ToneLibraryAndRingtoneRTTTLPlayer
 
I need to go on wife's computer as I can't access the site from my computer. I contacted Nortons but??
Thanks will look at it.
Maybe get a copy of said tone library?
 
You can't access the site at all? If that's the case you really ought to dump Norton.

Anyway, here's a copy of the libs, but you should really read the wiki page.
 

Attachments

  • RTTTL_v10.zip
    6.3 KB · Views: 306
  • tone_v10.zip
    6.3 KB · Views: 322
tried compiling the RTTTL example and get multiple compile errors.
I see there is an INCLUDE File named mplabcd.bas
can't locate
 
Of course it doesn't compile (for you). What errors are you getting?

Did you download and unzip both RTTTL and TONE files?
The tone.bas library is different than the version that was posted here... it has more features.

I see there is an INCLUDE File named mplabcd.bas
... which doesn't get included unless you've changed '#option _RTTTL_TRAP' or '#option _TONE_TRAP' and added '#option MPLAB_ICD = true'
 
Thanks... we'll see!

MrDeb - I noticed in one of your screen shots that you have about a dozen files open in editor windows, and some of them have multiple versions. One thing that might help is to close all those you're not using (File | Close All) and only open RTTTL_example.bas.

Also, in the SF IDE, open the menu 'View | Editor Options... | General' tab and check 'Display full filename path in application title bar' and click 'OK'. That way, the main title bar will show exactly which file you have open and are about to compile.
 
Thanks... we'll see!

MrDeb - I noticed in one of your screen shots that you have about a dozen files open in editor windows, and some of them have multiple versions. One thing that might help is to close all those you're not using (File | Close All) and only open RTTTL_example.bas.

Also, in the SF IDE, open the menu 'View | Editor Options... | General' tab and check 'Display full filename path in application title bar' and click 'OK'. That way, the main title bar will show exactly which file you have open and are about to compile.

Ahhh yes. There is a certain history of posting code that has nothing to do with le problème du moment
 
yup.

For example, in post #35 the IDE shows you have two versions of the tone library.
One file is named 'tone.bas' and the other one is named 'tone(1).bas'
This happened when you were copying files and didn't let it over-write the old version.

That will not work... it will never include 'tone(1).bas', and there's a really good chance that's the file you want to use.
 
I need to use the other tone.bas file I named tone2.
Will try later as I have welding etc. to complete on my wife's "hot rod golf cart" I am building.
 
Do yourself a big favor and get rid of all the copies of tone.bas, including any renamed copies.

Use the one that's in tone_v10.zip... it's 100% compatible with anything you were using before, and there's nothing inside tone.bas that you should change.
 
Last edited:
IN THE PROCESS OF ELIMINATING ALL THE TONE.BAS THEN REINSTALLING RTTTL AND THE TONE.BAS V10
sorry about the caps.
 
I eliminated ALL the tone.bas files and saved the tone.bas v10
still getting compiling errors?
 

Attachments

  • Screenshot (61).png
    Screenshot (61).png
    201.5 KB · Views: 324
I started a new copy and saved it in a different file location
saved TONE.BAS, RTTTL.BAS AND RTTTL EXAMPLE.
still wont compile
going to redo all the downloaded files (all three) and save in a different location.
using the links that Tumbleweed posted in post#48
 
I have NEVER used swordfish... Just downloaded.. Took the tone.bas and example... placed in a folder.. Compiled... 1 error.. too many variables... Changed variable list to fit.... Hey... Compiled and worked just fine.... Imperial march in me ears....

I just needed to see why the errors you are getting are simple ones.. ie TRISD not defined... Well... That's not good... Are you redefining the processor?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top