SX DEVICE Questions
Bill Chennault
Posts: 1,198
All--
I do not have a good grasp of the DEVICE statement options. As long as I stick to an SX28 and use the DEVICE statements·adopted from·demo code, I am fine. However, I want to use the SX48. I can do this currently, but I have to remove the SX-Key prior to executing the program. This, of course, makes using debug statements impossible.
If I don't remove the SX-Key, the program does not execute.
I wonder what I might be doing wrong? Have I posted enough information to give you a clue? (It may have nothing to do with the DEVICE statement. But, that is my only GUESS at this point.)
I have scanned the SX-Key/Blitz documentation online. I might be wrong, but it does not seem to provide a clear explanation of what all the options do. My main question, I suppose, concerns whether I have to specify in the DEVICE statement whether I am using the SX-Key to produce the clock or an external resonator. (The SX28 either doesn't care, or it doesn't matter or this question is misguided in the first place.)
Thanks!
--Bill
ps I am still going to buy the SX-Key book.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
I do not have a good grasp of the DEVICE statement options. As long as I stick to an SX28 and use the DEVICE statements·adopted from·demo code, I am fine. However, I want to use the SX48. I can do this currently, but I have to remove the SX-Key prior to executing the program. This, of course, makes using debug statements impossible.
If I don't remove the SX-Key, the program does not execute.
I wonder what I might be doing wrong? Have I posted enough information to give you a clue? (It may have nothing to do with the DEVICE statement. But, that is my only GUESS at this point.)
I have scanned the SX-Key/Blitz documentation online. I might be wrong, but it does not seem to provide a clear explanation of what all the options do. My main question, I suppose, concerns whether I have to specify in the DEVICE statement whether I am using the SX-Key to produce the clock or an external resonator. (The SX28 either doesn't care, or it doesn't matter or this question is misguided in the first place.)
Thanks!
--Bill
ps I am still going to buy the SX-Key book.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Comments
You should post a demo program that gives you troubles -- I can't think of what's causing the problem. Are you using a USB SX-Key? At EFX-TEK we found we had to remove a 10k shunt resistor across the resonator socket pins to get the USB SX-Key to work in Debug mode.
Yes, I am using a USB SX-Key. I will post a dirt-simple demo program tomorrow. The problem is doubtless something dumb on my part.
I appreciate your help, as always.
By the way, I am learning a tremendous amount by dissecting your various SX demo programs! Between the programs and your book, I am able to put the SX to good use in my amateurish robotics efforts. The multi-processor Ugly Buster, who became RC Buster, is now being transmorgified into an SX48 machine with a wireless web cam and a PING personality.
HOPEFULLY, Parallax will announce their much longed-for WiFi module. If it requires a BOE to operate, I should be able to make it talk to an SX via the BOE Stamp. At least that is my goal. I have not investigated other, apparently perfectly capable, WiFi modules because I want the Parallax documentation and support.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Here are two demo programs. One is as simple as I can make it and works well with either the SX28 or SX48 module using the SX-Key and Debug/Poll combination.
The other is your (JM) PING.SXB. It runs perfectly well using the SX28/Debug/Poll combination. However, when an SX48 module is placed in the PDP's 40 pin socket (and the SX28 removed, of course) and the Device is changed to SX48 along with the necessary movement of the output·pin·from the SX28 socket's "RB.1" to the 40 pin socket's "1", it will not execute using the SX-Key and Debug/Poll combination.
I have no ego and fully expect that I am doing something so dumb as to be a waste of your time. I may have a flaky SX-Key. (I only have one.) I have tried several SX48 modules with the same results. (I have a bunch.)
I appreciate your help!
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Most of the time I just use the built in serial port for debugging. All you need is a piece of cable and a DB-9 connector. There is already a MAX232 onboard so it is easy to use.
I didn't use the debugging feature a lot but when I did I had been using the older Serial based SX-Key. I wonder if the newer USB Key doesn't like the 10K resistor on the resonator where the older SX-Key was fine with it. I guess a bit of testing with the different versions of the SX-Key are in order.
Great help! Thanks!
All of my RobotWorkshop SX48 modules have a socket for the resonator tucked beneath the module. It is an extremely neat arrangement. I removed the resonator in all tests with Debug.
I would love for the SX48 module to work with the USB SX-Key. However, if Parallax still sells them, buying serial SX-Keys is not a problem. I was on the verge of buying several more USB SX-Keys, but I could just as easily get serial SX-Keys . . . if they are available. (No clue.)
If I can run any more tests or provide more information, please let me know. The SX48 module is the cat's meow as far as I'm concerned. It is a drop-in replacement for the BS2p40, only STUPENDOUSLY FASTER, with 32 I/O pins, more RAM, interrupts, and BASIC. My goal is to use a LOT of I/O with simple programming that talks to a PC via WiFi. Of course, Parallax needs to come through on the WiFi module they semi-announced last year. Among the three--Bean, JonnyMac, and RobotWorkshop--I don't know how one could go wrong with the great SX processor. It is my fervent desire that all three of you will continue to refine and produce your products. I am certainly willing to pay for them and I know others are, as well. The SX is nowhere near death, despite rumors to the contrary.
Great products are worth the money. The innovations the three of you have presented are certainly responsible for a lot of Parallax sales to our audience.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Unfortunately, the Serial Key is gone -- I guard the one I have left very carefully.
Thank you for the suggestion and information. I will see what Robert might figure out before I butcher my SX-Key.
Debug? (Maybe) I don't need no stinking debug! [noparse]:)[/noparse]
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
To clarify it appears that it may require a small mod to the SX48 module (not the USB SX-Key) to get the USB Key working properly in debug mode. It sounds like the USB doesn't like the extra 10K resistor on two of the resonator pins. This resistor is on the SX48 module itself. I've never had an issue with the Serial Key and usually install that resistor. However if the USB Key doesn't like it then I could remove that resistor from the modules that are already assembled and leave them off any others you may need down the road. I just want to verify that will fix the issue you've run into and if so I'll be glad to perform the modification on the modules for you.
Robert
It has always been a pleasure dealing with you. Your SX48 module is truly professional.
I will await word from you. I think you have my e-address.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
I have one of the modules that I built without the 10K resistor and the debug works just fine. However, I also have another module which still has the 10K resistor in place (on my sons robot) and the debug also seems to work ok too. Neither one worked on my first attempt. Why, because I have the development tools installed on a couple systems and the laptop I am using was still running the SX-key software 3.2.3 It found the USB SX-key and could program the chip. When using the older version it would sometimes pop up COM port not found and all the debug options were grayed out. After I downloaded the latest v3.3.0 version and installed it that fixed the problem. It also updated some of the FTDI USB drivers on the system.
Are you using the latest v3.3.0 or an older version of the software? If you have the latest do you have more than one USB SX-Key? Perhaps some are more picky about the 10K resistor being installed than others.
Robert
Thanks for the suggestion. NOW, I have the latest version of everything. There is a definite CHANGE, maybe it is an improvement. [noparse]:)[/noparse] I am going to keep working at it, with a little help from my friends, until I get it right.
I MIGHT be back to the point at which all the problems are created only by me. That is a very familiar situation for me. Currently, though, it seems that if I only want to use the USB SX-Key to generate the clock at 4MHz, everything is fine. Or, I can run the SX48 module standalone with a 20MHz resonator and it works equally well. But, with the resonator inserted AND the USB SX-Key plugged in, the timing is WAY off.
I certainly appreciate all you are doing for me.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
One thing you said concerns me ....
"But, with the resonator inserted AND the USB SX-Key plugged in, the timing is WAY off."
... You can have the resonator plugged in for programming but it must be REMOVED for debugging. If you have the resonator in place then that will definitely throw things off.
Now, if the resonator is out and you still run into issues debugging then that may point to the 10K resistor by the resonator socket, a very picky USB SX-Key, or something else. It would be nice to find out if it acts the same way on a Parallax Proto board. That doesn't have a 10K resistor. We could try adding one to that board for testing and see how it reacts.
Robert
I understand about Debug with a resonator inserted. When I have the resonator inserted along with the USB SX-Key, all I do is download and execute code.
I believe I said something contradictory in one of our communications concerning apparent timing when both the USB SX-Key and a 20MHz resonator are inserted. Instead of choosing which statement is correct, I will retest and let you know.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
I have two Parallax SX48 Proto Boards on the way, along with three more PING)) machines.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.