C programming for SX
DJFX
Posts: 15
Hello I have a particular problem when using Byte Craft to program the SX.· It only works when I leave the SX-Key connected.· I was wondering if anyone else has had this problem or maybe can assist me with this issue?· Any help would be greatly appreciated.·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
I find that the first few times I program an SX chip it works fine by itself, but after·being·programmed a dozen times or so,·it will only·startup properly·with the SX-Key attached.· I investigated further and found that the OSC wasn't oscillating.· I tried adding various resistors and caps on the resonator, which might work for a short while, but would eventually have the same problem.··To get reliable startup, I had to restrict my SX usage to applications that could use the internal 4 Mhz oscillator, though very recently I've·had·one SX-28 that needs the SX-Key to run on the SX Tech board·even with the·internal 4 Mhz clock.· Previous to this recent incident with the SX-28 on a SX Tech board, all·my earlier problems had occurred with SX-48's on custom PCB's or commercial USB·modules like the DLP-245SY, and the Elexol USB I/O 24.
I use CCS SXC Compiler version 3.042.· I've tripled checked compiler directives and SX-Key fuse options, they're always been·correct.··My programs work fine, until·an SX·chip has been programmed too many times.· I can program a older known-good version on a problem chip and it won't startup properly, or burn the "problem" version of my program onto a new SX chip and have it work perfectly.
SX-28 on Tech Board w/ Internal 4Mhz osc
#include <SX28AC.h>
#use delay(clock=4000000)
#fuses INT4MHZ,NOWDT,NOPROTECT,PAR
SX-48 on·DLP-245SY w/ External 50Mhz resonator
#include <SX48BD.h>
#use delay(clock=50000000)
#fuses HS,NOWDT,NOPROTECT,PAR
·
Post Edited (Ron Belknap) : 12/5/2005 7:18:38 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Move it closer, then it will work.
For 4Mhz resonator, use DEVICE oschs1.
For 20Mhz or 50Mhz use oschs2.
I will work, just needs a bit of time and effort.
While the oschs1, oschs2, and so on are assigned to particular frequency ranges, they basically are different levels of oscillator drive power.
I suppose you could bump up one level if the oscillator won't go.
Reconsider your hardware.
The problem could be the kind of crystal one is using, the quality of the osillator device, voltage drop due to small or long leads, cold solder joints, not using capacitors on a resonator that requires them, or using an improper resistor omiting a resistor in parallel.
So, if you have a good 'always working' resonator, set it aside for troubleshooting.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan