[PIC] An In-Circuit Serial Programmer application

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[PIC] An In-Circuit Serial Programmer application

Don Kuenz
 
This project shows how to implement an In-Circuit Serial
Programmer application. It utilizes the ICSP's 5 VDC
(Vdd) pin to toggle the PIC microcontroller between
application mode and programming mode.

https://crcomp.net/icsp/index.php

(Thank you In Advance to readers who alert me to typos and whatnot.)

Danke,

--
Don, KB7RPU, https://www.qsl.net/kb7rpu
There was a young lady named Bright Whose speed was far faster than light;
She set out one day In a relative way And returned on the previous night.

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [PIC] An In-Circuit Serial Programmer application

Chris Roper
Nice, but why not just use two Jumpers or a DPDT switch rather than add
additional silicon?
My preference with the more recent PIC's is to use PPS to assign the USART
to those pins.
I then use the PICKit as a terminal for debugging as well as a Programmer.
The serial interface may even have a use in the target application.
Have the serial interface use the same pin assignments as the ICSP and you
have a nice 'Plug and Play' programming/debugging/communications port.


On Sun, 15 Nov 2020 at 23:03, Don Kuenz <[hidden email]> wrote:

>
> This project shows how to implement an In-Circuit Serial
> Programmer application. It utilizes the ICSP's 5 VDC
> (Vdd) pin to toggle the PIC microcontroller between
> application mode and programming mode.
>
> https://crcomp.net/icsp/index.php
>
> (Thank you In Advance to readers who alert me to typos and whatnot.)
>
> Danke,
>
> --
> Don, KB7RPU, https://www.qsl.net/kb7rpu
> There was a young lady named Bright Whose speed was far faster than light;
> She set out one day In a relative way And returned on the previous night.
>
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [PIC] An In-Circuit Serial Programmer application

Chris Roper
P.S. - It also works well with a Bootloader.
use the ICSP interface to install the TinyBootloader or an equivalent with
the ICSP Dat and Clk lines set at the Rx and Tx lines and you have a nice
development device with Programming, Debugging and Communications all
achieved via a USB/Serial adapter - Great to hand out to students or use
for casual experimenting as well as in target applications.
Cheers
Chris



On Mon, 16 Nov 2020 at 00:25, Chris Roper <[hidden email]> wrote:

> Nice, but why not just use two Jumpers or a DPDT switch rather than add
> additional silicon?
> My preference with the more recent PIC's is to use PPS to assign the USART
> to those pins.
> I then use the PICKit as a terminal for debugging as well as a Programmer.
> The serial interface may even have a use in the target application.
> Have the serial interface use the same pin assignments as the ICSP and you
> have a nice 'Plug and Play' programming/debugging/communications port.
>
>
> On Sun, 15 Nov 2020 at 23:03, Don Kuenz <[hidden email]> wrote:
>
>>
>> This project shows how to implement an In-Circuit Serial
>> Programmer application. It utilizes the ICSP's 5 VDC
>> (Vdd) pin to toggle the PIC microcontroller between
>> application mode and programming mode.
>>
>> https://crcomp.net/icsp/index.php
>>
>> (Thank you In Advance to readers who alert me to typos and whatnot.)
>>
>> Danke,
>>
>> --
>> Don, KB7RPU, https://www.qsl.net/kb7rpu
>> There was a young lady named Bright Whose speed was far faster than light;
>> She set out one day In a relative way And returned on the previous night.
>>
>> --
>> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
>> View/change your membership options at
>> http://mailman.mit.edu/mailman/listinfo/piclist
>>
>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

[PIC] An In-Circuit Serial Programmer application

Don Kuenz
In reply to this post by Don Kuenz
 
>> Don wrote:
>>> This project shows how to implement an In-Circuit Serial
>>> Programmer application. It utilizes the ICSP's 5 VDC
>>> (Vdd) pin to toggle the PIC microcontroller between
>>> application mode and programming mode.
>>>
>>> https://crcomp.net/icsp/index.php

> Chris wrote:
>> Nice, but why not just use two Jumpers or a DPDT switch rather than add
>> additional silicon?
>> My preference with the more recent PIC's is to use PPS to assign the USART
>> to those pins.
>> I then use the PICKit as a terminal for debugging as well as a Programmer.
>> The serial interface may even have a use in the target application.
>> Have the serial interface use the same pin assignments as the ICSP and you
>> have a nice 'Plug and Play' programming/debugging/communications port.

Chris wrote:
> P.S. - It also works well with a Bootloader.
> use the ICSP interface to install the TinyBootloader or an equivalent with
> the ICSP Dat and Clk lines set at the Rx and Tx lines and you have a nice
> development device with Programming, Debugging and Communications all
> achieved via a USB/Serial adapter - Great to hand out to students or use
> for casual experimenting as well as in target applications.

There's four good reasons (or at least three and a half) for me to use
additional silicon. Let's start with the half reason. If you look
closely at Figure 4 you see a blue DIP switch near the top, middle. It's
a drag to flip those switches each time. A mouse click is so much
easier.
    There's also a dearth of ICSP applications available on the Inet,
probably for a very good reason. The wide, inviting, easy route with old
MCUs is to simply dedicate RB6 and RB7 to ICSP. The third reason is my
application allows all 8 bits of RB to be used.
    The final reason is actually the best. It motivated you to talk
about another way. It's time for me to step up to an MCU with a UART.

Danke,

--
Don, KB7RPU, https://www.qsl.net/kb7rpu
There was a young lady named Bright Whose speed was far faster than light;
She set out one day In a relative way And returned on the previous night.

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [PIC] An In-Circuit Serial Programmer application

Brent Brown-2
On 16 Nov 2020 at 0:17, Don Kuenz wrote:

>  
> >> Don wrote:
> >>> This project shows how to implement an In-Circuit Serial
> >>> Programmer application. It utilizes the ICSP's 5 VDC
> >>> (Vdd) pin to toggle the PIC microcontroller between
> >>> application mode and programming mode.
> >>>
> >>> https://crcomp.net/icsp/index.php
>
> > Chris wrote:
> >> Nice, but why not just use two Jumpers or a DPDT switch rather than add
> >> additional silicon?
> >> My preference with the more recent PIC's is to use PPS to assign the USART
> >> to those pins.
> >> I then use the PICKit as a terminal for debugging as well as a Programmer.
> >> The serial interface may even have a use in the target application.
> >> Have the serial interface use the same pin assignments as the ICSP and you
> >> have a nice 'Plug and Play' programming/debugging/communications port.
>
> Chris wrote:
> > P.S. - It also works well with a Bootloader.
> > use the ICSP interface to install the TinyBootloader or an equivalent with
> > the ICSP Dat and Clk lines set at the Rx and Tx lines and you have a nice
> > development device with Programming, Debugging and Communications all
> > achieved via a USB/Serial adapter - Great to hand out to students or use
> > for casual experimenting as well as in target applications.
>
> There's four good reasons (or at least three and a half) for me to use
> additional silicon. Let's start with the half reason. If you look
> closely at Figure 4 you see a blue DIP switch near the top, middle. It's
> a drag to flip those switches each time. A mouse click is so much
> easier.
>     There's also a dearth of ICSP applications available on the Inet,
> probably for a very good reason. The wide, inviting, easy route with old
> MCUs is to simply dedicate RB6 and RB7 to ICSP. The third reason is my
> application allows all 8 bits of RB to be used.
>     The final reason is actually the best. It motivated you to talk
> about another way. It's time for me to step up to an MCU with a UART.

IMHO the ICSP circuit can be simpler yet remain effective i many cases... just a
single pull up resistor to VDD. Value of 10k works well for me, using ICD3 and
ICD4. The resistor must present not too great a load to the programmer during HV
programming mode, nor push up VDD appreciably. Conversely it must be low
enough value to prevent unwanted MCLR pul downs by noise. A couple of basic
tips: keep traces short around ICSP, and don't expose VDD to the outside world
where it can pick up noise. In most cases the RC reset circuit is no great loss with
most PIC's having fairly decent internal power up & brownout reset generators that
can be enabled.

Yes ~ a bootloader is indispensable once you have settled on a good one. All going
well you then only need to use ICSP once... so isolation becomes less important. I
prefer a bootloader that doesn't require a button press, DIP switch, or jumper, to
initiate it... these are time consuming and annoying steps during development
code/program/debug cycles (frequent for me), and a complication when doing field
updates. Ideal: bootloader runs for a brief time at reset and invokes loading if
detected else runs application, optionally add hardware reset capability by using
e.g. the RTS line, and/or have the application code invoke the bootloader after
receiving a serial escape sequence (unless this presents an unacceptable security
risk).

Nice work on the web page though, good circuit design/description. I skip read it
and only noticed a missing "be" in 4th pragraph "can not left unused".

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

[PIC] An In-Circuit Serial Programmer application

Don Kuenz
 
Brent wrote:

<snip>

> IMHO the ICSP circuit can be simpler yet remain effective i many cases... just a
> single pull up resistor to VDD. Value of 10k works well for me, using ICD3 and
> ICD4. The resistor must present not too great a load to the programmer during HV
> programming mode, nor push up VDD appreciably. Conversely it must be low

> P.S. - It also works well with a Bootloader.
> use the ICSP interface to install the TinyBootloader or an equivalent with
> the ICSP Dat and Clk lines set at the Rx and Tx lines and you have a nice
> development device with Programming, Debugging and Communications all
> achieved via a USB/Serial adapter - Great to hand out to students or use
> for casual experimenting as well as in target applications.
> enough value to prevent unwanted MCLR pul downs by noise. A couple of basic
> tips: keep traces short around ICSP, and don't expose VDD to the outside world
> where it can pick up noise. In most cases the RC reset circuit is no great loss with
> most PIC's having fairly decent internal power up & brownout reset generators that
> can be enabled.
>
> Yes ~ a bootloader is indispensable once you have settled on a good one. All going
> well you then only need to use ICSP once... so isolation becomes less important. I
> prefer a bootloader that doesn't require a button press, DIP switch, or jumper, to
> initiate it... these are time consuming and annoying steps during development
> code/program/debug cycles (frequent for me), and a complication when doing field
> updates. Ideal: bootloader runs for a brief time at reset and invokes loading if
> detected else runs application, optionally add hardware reset capability by using
> e.g. the RTS line, and/or have the application code invoke the bootloader after
> receiving a serial escape sequence (unless this presents an unacceptable security
> risk).
>
> Nice work on the web page though, good circuit design/description. I skip read it
> and only noticed a missing "be" in 4th pragraph "can not left unused".

Your successful experience with using a single pull up resistor and
dropping the diode and capacitor confirms my suspicion the old
Guideline's mostly a historic artifact. This thread gives me plenty to
think about.
    The typo on the webpage's now corrected. My website attempts to
follow an ARRL format with its projects. It's my goal to push my lab
notes out to the web.

Danke,

--
Don, KB7RPU, https://www.qsl.net/kb7rpu
There was a young lady named Bright Whose speed was far faster than light;
She set out one day In a relative way And returned on the previous night.

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [PIC] An In-Circuit Serial Programmer application

Alan Pearce
> Your successful experience with using a single pull up resistor and
> dropping the diode and capacitor confirms my suspicion the old
> Guideline's mostly a historic artifact.

I wouldn't go as far as describing the guidelines as a historic
artifact. It is more a case that most of the new chips have a power up
timer, so having a time constant on the MCLR pin is not as important
now.

But it is still relevant to the 16F84 chip depicted in the schematic,
and any other chips that don't have a power on timer.

On Mon, 16 Nov 2020 at 14:23, Don Kuenz <[hidden email]> wrote:

>
>
> Brent wrote:
>
> <snip>
>
> > IMHO the ICSP circuit can be simpler yet remain effective i many cases... just a
> > single pull up resistor to VDD. Value of 10k works well for me, using ICD3 and
> > ICD4. The resistor must present not too great a load to the programmer during HV
> > programming mode, nor push up VDD appreciably. Conversely it must be low
>
> > P.S. - It also works well with a Bootloader.
> > use the ICSP interface to install the TinyBootloader or an equivalent with
> > the ICSP Dat and Clk lines set at the Rx and Tx lines and you have a nice
> > development device with Programming, Debugging and Communications all
> > achieved via a USB/Serial adapter - Great to hand out to students or use
> > for casual experimenting as well as in target applications.
> > enough value to prevent unwanted MCLR pul downs by noise. A couple of basic
> > tips: keep traces short around ICSP, and don't expose VDD to the outside world
> > where it can pick up noise. In most cases the RC reset circuit is no great loss with
> > most PIC's having fairly decent internal power up & brownout reset generators that
> > can be enabled.
> >
> > Yes ~ a bootloader is indispensable once you have settled on a good one. All going
> > well you then only need to use ICSP once... so isolation becomes less important. I
> > prefer a bootloader that doesn't require a button press, DIP switch, or jumper, to
> > initiate it... these are time consuming and annoying steps during development
> > code/program/debug cycles (frequent for me), and a complication when doing field
> > updates. Ideal: bootloader runs for a brief time at reset and invokes loading if
> > detected else runs application, optionally add hardware reset capability by using
> > e.g. the RTS line, and/or have the application code invoke the bootloader after
> > receiving a serial escape sequence (unless this presents an unacceptable security
> > risk).
> >
> > Nice work on the web page though, good circuit design/description. I skip read it
> > and only noticed a missing "be" in 4th pragraph "can not left unused".
>
> Your successful experience with using a single pull up resistor and
> dropping the diode and capacitor confirms my suspicion the old
> Guideline's mostly a historic artifact. This thread gives me plenty to
> think about.
>     The typo on the webpage's now corrected. My website attempts to
> follow an ARRL format with its projects. It's my goal to push my lab
> notes out to the web.
>
> Danke,
>
> --
> Don, KB7RPU, https://www.qsl.net/kb7rpu
> There was a young lady named Bright Whose speed was far faster than light;
> She set out one day In a relative way And returned on the previous night.
>
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist