SoundPAL for SX chips (SX-28)
While I await for my SoundPAL to arrive next week, I decided to get a headstart and convert the (2) BS2 programs over to SX. Although they have not been tested yet I think they·are be ready. They do compile fine and anyone is welcome to modify them if I am doing anything wrong in the conversion. I have also attached the 2 BS2 program for comparison.
Thanks.
NEW UPDATE: Attached SX/B programs now work fine - identical to BS2 equivalents.
Post Edited (T&E Engineer) : 11/18/2007 12:48:45 AM GMT
Thanks.
NEW UPDATE: Attached SX/B programs now work fine - identical to BS2 equivalents.
Post Edited (T&E Engineer) : 11/18/2007 12:48:45 AM GMT
Comments
Thanks,
Phil
I've had no luck getting your program to run on my Prop-SX.
Phil, wow! That puppy's pretty LOUD! I wuz serprized!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rusty-
--
Rusty Haddock = AE5AE = rusty@fe2o3.lonestar.org
**Out yonder in the Van Alstyne (TX) Metropolitan Area**
Microsoft is to software what McDonalds is to gourmet cooking
BTW: What is an Prop-SX ? (Propeller? If so, it will not work as this is for SX chips only like the SX-28)
More to come....
It has a 32K eeprom and a serial interface(PC) and 16 high current outputs.
http://www.efx-tek.com/topics/prop-sx.html
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
·
For the working BS2 program:
baud····· CON· $8000 + 84·· 'Communication baudrate is 9600 for BS2
reset····· CON· $8000 + 813· 'Reset baudrate is 1200 for BS2
However, when I try something like·this for the SX it has a syntax·error:
baud·CON··$8000 + "N9600"·· 'Communication baudrate is 9600
reset1·CON··$8000 + "N1200"·· 'Reset baudrate is 1200
I then tried to then convert the HEX $8000 to decimal and add it which does compile but does not start the SoundPAL like I·might think. See below:
baud·CON· ·"N42368"··· ' $8000 (=32768) + N9600·· 'Communication baudrate is 9600
reset1·CON· ·"N33968"··' $8000 + N1200·· 'Reset baudrate is 1200
Any Help here?
As I understand it (but I've never used SX/B, so take with a grain of salt), the "N" in SX/B does the equivalent of adding $8000 in PBASIC, so you never need to do it explicitly. Also, I've not read enough of the manual to know whether putting the baudmode in quotes in a CON statement is actually supposed to work. The only examples I've seen so far put the N9600, for example, directly into the SEROUT.
-Phil
I still hear nothing. I also tried the N9600 and N1200 with not using quotes and I got an error because the CON statement see's the N with no quotes probably.
Is there anyway I can verify that it is even at the same equivalent baud as the BS2 version?
-Phil
-Phil
Note: This post was in response to a post that got deleted before this one could be submitted.
Thanks for your help!
BTW: Added in the DO UNTIL routine...
More to come this weekend.
Post Edited (T&E Engineer) : 11/17/2007 9:08:35 PM GMT
-Phil
I updated the original posting with the working SX/B equivalent programs.
Thanks again to Phil for a very cool project!
I still can't seem to get the SoundPAL working off the Servo pins
yet my 'candles' program works just fine.
After some 'sperimentation it looks like the program is hanging
on waiting for 'iopin' to come up to 1. I shouldn't need to pull
out the ULN chip for port B, do I? I wouldn't think so...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rusty-
--
Rusty Haddock = AE5AE = rusty@fe2o3.lonestar.org
**Out yonder in the Van Alstyne (TX) Metropolitan Area**
Microsoft is to software what McDonalds is to gourmet cooking
Post Edited (Fe2o3Fish) : 11/18/2007 5:45:55 AM GMT
The SoundPAL uses a weak internal pullup to provide a "high" level for serial communications. If the port pin you're using is loaded toward ground by another device, the SoundPAL's pullup current may be inadequate. You can either remove the additional load or augment the pullup current. A 4.7K resistor to Vdd may well do the trick.
-Phil
and the bugger starts playing 'CHARGE!' at me. <hrumph!>
Guess I need to hit the books (PDF files) and see why that wuz
gittin' in my way. <heavy sigh> Nevermind me. I'm just an OF
that someone put a match to...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rusty-
--
Rusty Haddock = AE5AE = rusty@fe2o3.lonestar.org
**Out yonder in the Van Alstyne (TX) Metropolitan Area**
Microsoft is to software what McDonalds is to gourmet cooking
Post Edited (Fe2o3Fish) : 11/18/2007 6:04:16 AM GMT