sx-28 dp question
in the manual, in the connection diagram section, it states that the 10k resistor connected to the MCLR pin is not needed when controlled externally.........does the MCLR pin need to be high all the time to keep it from getting bumped low accidentally? Or ,if not, what is the purpose?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
"It won't find it" doesn't really help [noparse];)[/noparse]
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Teacher: What is the difference between ignorance and apathy ?
Student: I don't know and I don't care
Teacher: Correct !
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
2) When the drivers are installed correctly, try the following:
- unplug the SX-Blitz, launch the SX-Key IDE, select "Run - Configure" and memorize the available COM ports listed.
- shut down the IDE, plug in the SX-Blitz, and launch the IDE again.
- Select "Run - Configure" - the list of available COM ports should have a new entry now - the one for die SX-Blitz, so select this one.
3) Try to program the SX again.
When you get an error like "chip connection failed", this indicates that the IDE and the SX-Blitz have established communications (otherwise, you would get an error like "SX-Key/Blitz not found on COM 9") but that the communication between the SX-Blitz and the SX chip has failed. Often the problem is simply gone when you re-try programming.
Other reasons for this error can be bad electrical connections (SX-Blitz to 4-pin header, SX to socket), or a weak power supply. A tantalum cap of 47µF between Vdd and Vss often helps a lot.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
Günther
All I want is RB5 and RB7 to do certain things, and they are just randomly oscillating.
If I were to write this in BS1 i would do it like this:
SYMBOL reps = W1
SYMBOL i = W1 ' FOR...NEXT loop counter
Main:
FOR reps = 0 TO 65535 STEP 3000
FOR i = 1 TO 64
TOGGLE 5
PAUSE 11
NEXT
PAUSE 100
FOR i = 1 TO 4
HIGH 7
PAUSE 20
LOW 7
PAUSE 50
NEXT
PAUSE 150
NEXT
How would you accomplish this with the sx28?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB
good to learn that you've got it running - on the behalf of others who follow this thread, let me ask one simple question: WHY
Concerning your code problem, we (speaking for the community of helpful individuals in this forum) could better help you if you'd post the non-working sampe code you got from someone, instead of some BS1 code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
Here is the code, it might be good , but all i got was oscillation, even after changing delay_ms 40 to 2000:
' ========================================================================='' File...... REPS.SXB' Purpose...' Author.... Jon Williams, EFX-TEK' Copyright (c) 2007 EFX-TEK' Some Rights Reserved' -- see http://creativecommons.org/licenses/by/3.0/' E-mail.... jwilliams@efx-tek.com' Started...' Updated...'' ========================================================================='
' Program Description'
'
' Conditional Compilation Symbols'
'
' Device Settings'
DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX, BOR42FREQ 4_000_000ID "Reps"'
' I/O Pins'
Light1 PIN RB.1 OUTPUTLight2 PIN RB.7 OUTPUT'
' Constants'
IsOn CON 1IsOff CON 0'
' Variables'
reps VAR Wordidx VAR BytetmpW1 VAR Word' =========================================================================' INTERRUPT' =========================================================================' RETURNINT' ========================================================================= PROGRAM Start' ========================================================================='
' Subroutine / Function Declarations'
DELAY_MS SUB 1, 2'
' Program Code'
Start:Main: FOR reps = 0 TO 65535 STEP 3000 FOR idx = 1 TO 4 Light1 = IsOn DELAY_MS 40 Light1 = IsOff DELAY_MS 40 NEXT FOR idx = 1 TO 4 Light2 = IsOn DELAY_MS 40 Light2 = IsOff DELAY_MS 40 NEXT NEXT END'
' Subroutine / Function Code'
' Use: DELAY_MS mSecs' -- delays program in millisecondsSUB DELAY_MS IF __PARAMCNT = 1 THEN tmpW1 = __PARAM1 ELSE tmpW1 = __WPARAM12 ENDIF PAUSE tmpW1 ENDSUB'
'
' User Data'
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB
The document in this thread:
http://forums.parallax.com/showthread.php?p=662519
... should be helpful to you. The program you want to translate you can do almost verbatim; the only thing that changes is having a proper SX header and the variable declarations.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB
I've attached a schematic of one of my designs that shows the programming connections.
I have a tendancy to do that.........like I say tho, I am a noob, I make noob mistakes.......sure wish I was as good at this as you all are lol! Thanks for your help!!!
But, uh, so you are saying that while it is pulled high through a 10k, I can ground it out momentarily , and then it can be re-programmed?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB
I don't see any caps on your regulator. That may be causing the problem. A new chip will not oscillate (I don't think they do), but once programmed it will be oscilating and may be causing noise on the supply.
Check the schematic on the regulator you are using, they will recommend a cap on the input and output of the regulator.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Teacher: What is the difference between ignorance and apathy ?
Student: I don't know and I don't care
Teacher: Correct !
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB
giving technical support to a forum member can be a real challenge when one gets the information about a problem in single bits and pieces over several posts :-( .....
Ok, before trying to put together things here, one well-meant advise first: Keep cool, don't get nervous or hectic, and carefully read the already posted answers (they contain valuable information). If you are a smoker, smoking a cigarette might help, or maybe, drink a beer or some schnaps
The picture you have posted shows your setup for an SX 28 programmer. So you have removed the 4-pin receptable from the SX-Blitz, and soldered it directly to the board (Arghhh - using a 4-pin header might be a better idea). For the SX, you have placed a 4-pin receptable for pins 25...28, so you have access to /MCLR, OSC1 and OSC2. I assume that there is another 4-pin receptable for pins 1 to 4 on the other side for Vdd and Vss.
I'm a bit concerned about the receptables you are using. They are designed for square-shaped pins but not for the smaller pins on the SX DIP package. So you should concider replacing them by some "precision socket" types, similar to the DigiKey part-# ED7864-ND. Bad contacts can definitely cause errors like "Chip Connection failed". This even happens to me from time to time, although I'm using a Textool socket for my SX programmer.
I also noticed the 10kOhm resistor to pull up /MCLR to Vdd, which is absolutely necessary (provided that the solder pad for the right end of the resistor is connected to Vdd). I also see the voltage regulator but I can't determine which type it is. What I don't see at all are any filter caps around the regulator. You should at least add a 47µF elcap between the Vout and the GND pins to avoid a voltage drop when the SX-Blitz starts programming the device. It is also a good idea to place two 100nF ceramic caps from Vin to GND, and from Vout to GND to avoid unwanted oscillations of the regulator (the 7805 types tend to do this from time to time).
You have mentioned that you could program an SX only once with this setup. Although this might be bad at first glance, it is really good news, as it tells you that the SX-Blitz works, and that the SX28 is fine, and you can be sure that it is very unlikely to kill an "SX virgin" when it is programmed "for the very first time" (sorry, Madonna)
One general remark for future designs: As long as you are only going to use this setup together with an SX-Blitz for programming, this is fine. Should you ever plan a similar setup with an SX-Key for debugging SXes, be aware that the length of the OSC1 and OSC2 leads between the SX-Key and the SX under test is a critical matter - IOW, the shorter, the better. With your setup, you might have trouble when running the SX at higher clock frequencies, like 50 MHz.
Don't smoke/drink too much, and good luck
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
Günther
it was related to how I programmed the oscillator settings on the previous programming
cycle.·What ever it did, it would lockup the chip and·programmer. Swiching chips·would verify
that it was in fact the chip.·In my case the chip and key would get warm when trying to program.
It was not a power supply related issue.
What I did, was unplug they key, and let everything cool. Then with the software
open, plug the key in to the chip and very quickly mash down on the program button...
9 times out of 10, it would·program again. If it plugged it in, and let it sit, it wouldn't
program until it cooled off and had a power cycle.
-Dan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A saint-like quantity of patience is a help, if this is unavailable, a salty vocabulary works nearly as well." - A. S. Weaver
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB, you could learn alot from a dummy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There's nothing like a new idea and a warm soldering iron.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB, you could learn alot from a dummy
remember which OSC drive levels I was using. I do remember that changing them fixed the problem...
The worst part, is when I tried to point out this problem, no one else·could seem to reproduce it.
Everyone thought I was crazy! Now, there's two of us·who are nuts!·
-Dan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A saint-like quantity of patience is a help, if this is unavailable, a salty vocabulary works nearly as well." - A. S. Weaver
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB, you could learn alot from a dummy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
·Yes I have ensured contacts are sufficient......... 0.00- 0.001 ohms.........the socket has double wiper contacts. As I mentioned earlier, I accidentally supplied Vdd into the OSC 1 pin for the first five minutes of the blitzes life, I think that has something to do with my problems........I am going to just scrap it and get an SX Key, and try not to kill it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ETERNAL NOOB, you could learn alot from a dummy