Download Circuit Question

bpowell

Senior Member
If we know the only way our PICAXE will be downloaded to is from a TTL connection (not a RS-232 port from a PC) is the 22k in-line resistor on the RX line necessary? I understand the pull-down is required to keep the pin held-low (and prevent the PICAXE from going into download-mode).

Thanks!
 

westaust55

Moderator
If the circuit is:
1 only used by you
2. You do not use poke or SRF poke commands
3. The voltage does not exceed the PICAXE supply voltage
then YES
The program download pin is a bidirectional pin which the PICAXE firmware endeavours to limit to use as an input.
But if any code error using POKE/SFR POKE command accidentally sets the pin as an output then Failure of the pin and thus chip can occur.

So I suggest you can omit the resistor but at your own risk.
 

bpowell

Senior Member
Thanks Westaust55...I hadn't considered what would happen if Serial IN were to flip to an output ... although, I've yet to see a PICAXE malfunction on its own, I can see myself play with pokes / SFR pokes ... and could get myself in trouble ... I'll work a resister into the mix...cheap insurance.

That being said ... on the topic of SFR pokes ... would it be possible to brick a PICAXE with an SFR change? That's an interesting thought.
 

AllyCat

Senior Member
Hi,
... would it be possible to brick a PICAXE with an SFR change?
Almost certainly not, because the SFRs are in RAM, not (EEP)ROM, which will be reset at Power-Up. Also, PICaxe Basic bars access to any of the "critical" SFRs which work at the Interpreter level. I believe only an external (hardware) Programmer has access to the "fuses" which might catastrophically change the PIC's configuration.

On the topic of series resistors, it's generally recommended to put a resistor in series with ANY input that connects to an "external" source. The (electrostatic) "protection" diodes on each PICaxe pin can only work effectively if there is a series resistance present, to limit the current from any (large) external over-voltage.

Cheers, Alan.
 

bpowell

Senior Member
I believe only an external (hardware) Programmer has access to the "fuses" which might catastrophically change the PIC's configuration.
Thanks Alan. I do program raw PICs, with PICKIT3 and now PICKIT4 .... I know you can render a chip non-functional with the fuses, but I don't believe there is anything you can do that can't be undone with the programmer ... AVRs need a "high voltage" programmer to reset some fuses; but PICs have been (in my experience) easy to recover with just the PICKITs ... that being said, there's nothing you can do with a PICKIT on a PICAXE...any fuse reprogramming on a PICAXE will reset it back to a raw PIC.
 

Goeytex

Senior Member
In regards to the 22K series resistor for Picaxe Programming, it CAN eliminated if all you do is Program with a TTL adapter, but I would not recommend it. I might reduce the value to 1K to at least have some protection from over voltage. If the reason to eliminate it is to gain space on a board then I would use a SMD 605 or 402 instead of through hole. If the board is through hole only, a 1/6 Watt radial is not very big. Maybe save some space elsewhere. If the reason to eliminate this resistor is parts count (ie. cost), well I have little pity for cheapskates ( I am one), but we are talking what? 10 cents for a Yaego 10K 1/6 watt axial resistor from Mouser .... ( Probably cheaper from Fleabay or other less reputable sources).

My question is why do you want to eliminate it?

------

Connecting a PICAXE to a programmer like a PK2/3/4 can only really do 1 thing and that is read the chip model and possibly the silicon revision, If the programmer (Pickit2/3) GUI Software is set to AutoDetect.

All Picaxe chips are code protected. You can't read the Flash Memory nor the EEPROM, and you can't change the config words ( fuses) without first erasing the chip. Then you no longer have a Picaxe but a bare (but functional) PIC. ... 2 to 6 quid down the drain.

AVR's CAN be "bricked" if the wrong fuses are changed/set . "Bricked" means the chip will not operate and cannot be recovered except via a "Parallel" Programmer that uses high voltage programming. These are somewhat expensive.

Goey
 
Last edited:

tmfkam

Senior Member
AVR's CAN be "bricked" if the wrong fuses are changed/set . "Bricked" means the chip will not operate and cannot be recovered except via a "Parallel" Programmer that uses high voltage programming. These are somewhat expensive.

Goey
I've never failed to "recover" an AVR using a programming circuit that applies a 1MHz external clock. This can often be as simple as making the programming connections then applying the external clock to the required pins with flying leads held in place for the duration of programming. This has worked so well that I built a slightly more permanent version for the devices we get frequently through the workshop that dislike being reprogrammed

Sadly, I still forget about the fuse settings on blank (new) devices and wonder why a new device won't work.
 
Top