Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Jan Waclawek
09/26/06 02:26
Read: 1042 times
Bratislava
Slovakia


 
#125052 - fresh experience
Responding to: Jan Waclawek's previous message
Yesterday I was "burning" an AT89S52, in-situ. I have access to parallel programmers and the chip was socketed, but I wanted to try it so I did not cheat :-)

For that, I built a "burner" from P89V51RD2, some supply (7805), a crystal, and a reset circuit. All in "bird's nest" style (the "burner" is not part of the circuit to be delivered so I didn't care). Still, I believe this is much better than any of the "LPT-connected" "cable".

The power was shared between the target board and the "burner". The target board has a proper reset IC, so no concern about problems during powerdown.

The "burner" firmware allows to manipulate the reset line (mental reminder: I need to add "manual manipulation" of the rest of signals (MISO MOSI SCK) and a "readback" of the state), set "speed" of SPI interface, transmit and receive individual bytes via SPI, and - the real stuff - emulates the "intelhex" protocol for the actual programming itself (I am using FlashMagic for convenience - Andrew Ayre would please kindly forgive this abuse).

I was cheating a little bit, as this setup was already tried in an almost a "standalone" configuration (the target AT89S52 in that configuration had the MISO/MOSI/SCK pins reserved for programming).

But this time it did not work at once. Bah...

Scope would be cheating so let's see what we can do with a cheap DMM.

The first problem was in the reset. On the target, a TL7705 provided reset for AT89S52. The "positive" reset output is an open collector of a PNP (!) transistor in TL7705, so it needs a pulldown. There is one built-in in AT89S52, but I don't like these things left "floating" (for case when other derivative with possibly no internal pulldown on RST is used); so there is an extra 10k pulldown. The "burner" had no pullup on pin driving RST, and the internal set of pullups of P89V51RD2 was good only to pull it up to some 2.6V... A 1k pullup and here we go with 4.5V, that's good enough.

The second problem was that MOSI conflicted with the circuit on board. There is a rotary encoder connected to it. Of course, when I designed the board, I knew it might conflict and that I would need to set the encoder so that it's switch is open during programming. And, of course, I forgot that when it came to actual programming. But this was easy to discover, too; and would be much easier would I put the manual manipulation and readback feature into the "burner's" firmware.

After the second problem solved (encoder turned to proper position), the autobaud/erase/program/verify/run cycle was repeated several times, with absolutely no problem whatsoever.


Conclusion (valid for LPT-style "programmers", too):

- state of RESET/MISO/MOSI/SCK (and oscillator) should be known (read back), and they should be settable/resettable "manually"

- consistent behaviour is much more easier to achieve in a "standalone" programmer


Jan Waclawek

List of 232 messages in thread
TopicAuthorDate
SPI ISP issues      Jan Waclawek      08/13/06 03:00      
   SPI ISP issues - part 2      Jan Waclawek      08/13/06 03:05      
      SPI ISP issues - part 3      Jan Waclawek      08/13/06 04:20      
   plural      Steve M. Taylor      08/13/06 05:38      
      Fora is certainly correct      Phillip M Gallo      08/14/06 15:44      
         no, it's not ...        Andy Peters      08/15/06 01:02      
            great post!      Phillip M Gallo      08/15/06 15:02      
   I think the biggest problem is with the AT      Richard Erlacher      08/13/06 10:22      
      maybe      Jan Waclawek      08/13/06 13:28      
         It's not necessarily the product ... it's the docs      Richard Erlacher      08/13/06 16:26      
            OK let them be so      Jan Waclawek      08/14/06 07:36      
               It's true, they shouldn't be used by anyone.      Richard Erlacher      08/14/06 08:27      
                  What would you suggest to use?      Kai Klaas      08/14/06 10:58      
                     Anything else at all would be fine ... even a PIC      Richard Erlacher      08/14/06 15:58      
                        Whaaaat???      Jan Waclawek      08/14/06 16:05      
                           ANYTHING but Atmel products!      Richard Erlacher      08/14/06 23:23      
                              Come on, Richard...      Kai Klaas      08/15/06 08:39      
                                 well, I, for one, agree with Richard      Erik Malund      08/15/06 08:44      
                                    Bullshit! Stating such is entirely ridiculous!      Kai Klaas      08/15/06 10:43      
                                       how can a FACT be \\\'ridiculous\\\"?      Erik Malund      08/15/06 10:49      
                                          It's ridiculous, because you deduce...      Kai Klaas      08/15/06 11:07      
                                             single event?      Erik Malund      08/15/06 11:19      
                                                Yes, and hundreds of events with Philips,      Kai Klaas      08/15/06 11:42      
                                                   a VERY high up 'idiot'      Erik Malund      08/16/06 07:01      
                                                Well, mine was a long series of events      Richard Erlacher      08/15/06 16:49      
                                                   there may be hope, sorry Kai      Erik Malund      08/17/06 12:05      
                                                      It will be a WARM December day in Moscow      Richard Erlacher      08/17/06 17:08      
                                                         maybe someone found out      Erik Malund      08/18/06 06:28      
                                                            The penalty isn't severe enough      Richard Erlacher      08/18/06 12:01      
                                                               blame the rest of the bunch      Erik Malund      08/18/06 12:52      
                                                                  Well, as I said, it's like U.S.-made cars      Richard Erlacher      08/18/06 16:41      
                                 If they'll do it to US, they'll do it to YOU!      Richard Erlacher      08/15/06 10:44      
                                    Do you really think that others are better??      Kai Klaas      08/15/06 11:03      
                                       all comapanies have things to blame them for      Erik Malund      08/15/06 11:18      
                                          Indeed!      Kai Klaas      08/15/06 11:36      
                                             a maxim about maxim      Andy Peters      08/15/06 12:17      
                                             Once upon a time ... there were second sources ...      Richard Erlacher      08/15/06 16:56      
                                       I don't love Philips, either      Richard Erlacher      08/15/06 16:51      
                                          I don't 'love' any company, but I 'love' to work w      Erik Malund      08/16/06 07:19      
                                             Once upon a time there were FAE's who knew things.      Richard Erlacher      08/16/06 09:43      
                                                once upon a time ...      Erik Malund      08/16/06 10:54      
                                                   Yes, it\'s like the grocery store      Richard Erlacher      08/16/06 14:23      
      The biggest problem is      Kai Klaas      08/14/06 07:44      
         do it - under my name      Jan Waclawek      08/14/06 08:33      
            All right, here is it...      Kai Klaas      08/18/06 21:49      
               Kai .. we're not getting a bit sensitive here ?      Phillip M Gallo      08/19/06 00:41      
                  noooooo................ hmm, maybe a bit...      Kai Klaas      08/19/06 23:07      
                     Why does this come up so frequently?      Richard Erlacher      08/19/06 23:19      
                        Because there is so much trash in the www!      Kai Klaas      08/21/06 10:21      
                           Maybe we can provide a local "fix" for that      Richard Erlacher      08/21/06 10:38      
                              Great idea, but...      Kai Klaas      08/21/06 22:04      
                                 the other side of the coin      Erik Malund      08/22/06 06:10      
                                    A fool who trusts on phantasy programmers      Kai Klaas      08/22/06 07:46      
                                       Kai the issue is        Erik Malund      08/22/06 08:02      
                                          Exactly!      Kai Klaas      08/22/06 09:14      
                                          Little Joe      Jon Ledbetter      08/22/06 09:26      
                                             did you not know      Erik Malund      08/22/06 09:44      
                                             especially since he\'s been deceased for some time      Richard Erlacher      08/22/06 09:58      
                                       Lots of those "fantasy" programmers are for sale      Richard Erlacher      08/22/06 09:57      
                                          What a trash!      Kai Klaas      08/22/06 22:23      
                                             Oddly enough, similar circuits work for JTAG      Richard Erlacher      08/22/06 22:31      
                                                Driving cables is nasty!!      Kai Klaas      08/22/06 22:53      
                                                   framkly, I wish eval-board makers would heed this      Richard Erlacher      08/22/06 23:16      
                                                      Have you tested series termination?      Kai Klaas      08/23/06 10:16      
                                                         would be great, but      Erik Malund      08/23/06 10:36      
                                                         Kai, I think that would be a WONDERFUL addition!      Richard Erlacher      08/23/06 12:52      
                                    Well, what I am thinking ...      Richard Erlacher      08/22/06 10:11      
                                       Yeah, but what's that to do with ISP?      Jon Ledbetter      08/22/06 10:20      
                                       grits, yes, oatmeal, no      Erik Malund      08/22/06 10:21      
                                          Some of 'em will look, read, and do SOME work      Richard Erlacher      08/22/06 17:57      
                                             and the winner is      Erik Malund      08/23/06 05:56      
               An alternative to Atmels ISP CABLE        Kai Klaas      08/20/06 22:46      
                  Profiting from highest noise margins      Kai Klaas      08/21/06 10:15      
                  comparator      Jan Waclawek      08/25/06 17:07      
                     Not so well suited...      Kai Klaas      08/26/06 08:28      
                        I don't understand.      Jan Waclawek      08/26/06 15:39      
                           Check the spec-sheets      Richard Erlacher      08/26/06 17:35      
                           I am sorry...      Kai Klaas      08/26/06 21:10      
                              cables et al      Jan Waclawek      08/27/06 00:57      
                                 Cables...      Kai Klaas      08/27/06 09:03      
                                    software      Jan Waclawek      08/27/06 15:09      
                                       ps      Jan Waclawek      08/27/06 16:17      
                                       To be honest...      Kai Klaas      08/27/06 20:12      
                                          Atmel software... a piece of @%^&      Jan Waclawek      08/28/06 04:02      
                                             it's for amateurs      Erik Malund      08/28/06 06:58      
                                                ??      Kai Klaas      08/28/06 07:20      
                                             Not at all        Kai Klaas      08/28/06 07:19      
                                                dear amateurs, be realistic      Erik Malund      08/28/06 08:02      
                                                   Erik, did you mean...      Jan Waclawek      08/28/06 09:24      
                                                      Why, oh, why      Erik Malund      08/28/06 09:39      
                                                         why, oh why      Jan Waclawek      08/28/06 09:45      
                                                            not the issue      Erik Malund      08/28/06 10:32      
                                                but you ARE professional!!!!      Jan Waclawek      08/28/06 09:39      
                                                   now, I'm going to upset Richard      Erik Malund      08/28/06 09:44      
                                                      ICE?      Jan Waclawek      08/28/06 09:51      
                                                      No success stories      Maarten Brock      08/28/06 12:28      
                                                         Exactly!      Kai Klaas      08/28/06 20:48      
                                                      Grrrr! Well, maybe not this time ...      Richard Erlacher      08/28/06 12:35      
                                             it makes you wonder, doesn't it?      Richard Erlacher      08/28/06 12:28      
                  ATMEL cable with the HC      Jan Waclawek      08/28/06 09:49      
                     another idea      Jan Waclawek      08/29/06 06:58      
                        please, pretty please      Erik Malund      08/29/06 07:22      
                           there is no magic      Jan Waclawek      08/29/06 07:32      
                              you said it      Erik Malund      08/29/06 07:47      
                                 you got me wrong      Jan Waclawek      08/29/06 07:53      
                                    do not blame me for what YOU said :)      Erik Malund      08/29/06 08:04      
                                       teaching is hard      Jan Waclawek      08/29/06 08:32      
                                          good analogy, the question is      Erik Malund      08/29/06 08:47      
                                             when I turned my back...      Jan Waclawek      08/29/06 09:07      
                                                you forgot      Erik Malund      08/29/06 09:14      
                                                   filter      Jan Waclawek      08/29/06 09:19      
                                                      nope      Erik Malund      08/29/06 09:25      
                        upside-down      Jan Waclawek      08/29/06 07:49      
                           and the 3rd reader      Erik Malund      08/29/06 07:57      
                              he already did      Jan Waclawek      08/29/06 08:14      
                                 a good one      Erik Malund      08/29/06 08:51      
                                    tell it beforehand      Jan Waclawek      08/29/06 09:11      
                              The newbie SHALL try to build his stuff, but...      Kai Klaas      08/29/06 09:24      
                                 allow a reply of \"you stupid idiot\" to anyone      Erik Malund      08/29/06 09:33      
                        Will not do the trick, unfortunately      Kai Klaas      08/29/06 09:14      
                           decoupling the LPT lines?      Jan Waclawek      08/29/06 09:41      
                              Low state noise margin...      Kai Klaas      08/29/06 09:43      
                                 and with a Schottky?      Jan Waclawek      08/29/06 09:53      
                                    No, I wouldn't recommend this      Kai Klaas      08/29/06 21:04      
                                       www.reichelt.de      Jan Waclawek      08/30/06 02:02      
                                          Ok, to be more precisely...      Kai Klaas      08/30/06 09:28      
                                             can you please draw it down?      Jan Waclawek      08/30/06 11:46      
                                                Replace the 74VHC244 in the original circuit      Kai Klaas      08/30/06 12:03      
                                    How would a germanium work?      Richard Erlacher      08/29/06 22:10      
                                       Could work!      Kai Klaas      08/29/06 22:34      
               thanks, Kai!      Jan Waclawek      08/25/06 16:58      
                  Schottky diodes      Kai Klaas      08/26/06 21:29      
                     to Schottky or not to Schottky :-)      Jan Waclawek      08/27/06 00:46      
                        Yes, but we must assume a minimum standard...      Kai Klaas      08/27/06 08:32      
                           shopping      Jan Waclawek      08/27/06 14:57      
                              My point is..      Kai Klaas      08/27/06 20:06      
                        You can use an array      Richard Erlacher      08/27/06 12:25      
                           Your search - 74S1023 - did not match any document      Jan Waclawek      08/27/06 15:03      
                              SN74S1053      Kai Klaas      08/27/06 19:54      
                              OOPS! it is 74S1053 ... sorry!      Richard Erlacher      08/27/06 22:29      
   the issues      Erik Malund      08/15/06 07:50      
   a most telling thread      Erik Malund      08/15/06 09:11      
      The root problem is that the first thing one needs      Richard Erlacher      08/15/06 17:02      
   "dedicated programmer"      Jan Waclawek      08/31/06 02:50      
      what's difficult to understand ...      Richard Erlacher      08/31/06 08:03      
         Ok, how do you propose they program and erase the      Erik Malund      08/31/06 08:27      
            I would not be quite so sure about that      Jan Waclawek      08/31/06 08:43      
            Keep in mind that this is for newbies ...      Richard Erlacher      08/31/06 12:29      
               but they still have to build it      Erik Malund      08/31/06 13:45      
      Only because it looks simple does not mean...      Kai Klaas      08/31/06 14:33      
         he's desperate      Erik Malund      08/31/06 15:19      
         there are lots of circuits published like this!      Richard Erlacher      08/31/06 16:41      
            I used to have memory mapped I/O in virtual      Erik Malund      09/01/06 06:23      
               I wouldn't say that ...      Richard Erlacher      09/01/06 09:00      
                  that threy learn to drive with a stick shift      Erik Malund      09/01/06 09:40      
                     Once again, you are exaggerating ...      Richard Erlacher      09/01/06 09:59      
                        the point I\'m trying to make (and believe that I      Erik Malund      09/01/06 10:46      
                           Yes, but in 101 you've got to use a '51 or '31      Richard Erlacher      09/01/06 13:47      
                              nonono      Jan Waclawek      09/01/06 14:16      
                                 Perhaps you\'re right, in this case ...      Richard Erlacher      09/01/06 14:40      
                                    I don't think so      Jan Waclawek      09/01/06 15:21      
                                       Ah but..      Steve M. Taylor      09/03/06 21:00      
                              halelujah!      Erik Malund      09/05/06 09:51      
                           the problem with RD2 is...      Jan Waclawek      09/01/06 14:17      
                              what cost the most      Erik Malund      09/05/06 09:58      
                                 cost      Jan Waclawek      09/06/06 08:40      
                                    patience is what it takes      Richard Erlacher      09/06/06 15:57      
         let's sort it out      Jan Waclawek      09/06/06 08:52      
   Richard, you aregue things that, while valuable ,      Erik Malund      09/05/06 09:56      
   Its not the cables if you ask me.      Jez Smith      09/06/06 15:25      
      an interesting thought      Erik Malund      09/06/06 15:39      
         It's probably not JUST this part ...      Richard Erlacher      09/06/06 16:01      
      not the cable alone      Jan Waclawek      09/07/06 01:00      
         it will, but      Erik Malund      09/07/06 06:34      
      It simply has to do with the numbers      Kai Klaas      09/07/06 09:02      
         maybe not quite ...      Richard Erlacher      09/07/06 09:33      
            I was assuming...      Kai Klaas      09/07/06 09:58      
               a case like that ...      Richard Erlacher      09/07/06 11:32      
                  I have      Erik Malund      09/07/06 11:43      
                     Perhaps it's that the approach is wrong      Richard Erlacher      09/07/06 15:29      
                        I guess I have seen those ... ...      Richard Erlacher      09/18/06 10:37      
   fresh thoughts      Jan Waclawek      09/18/06 07:52      
      ???????????????      Kai Klaas      09/18/06 11:03      
         I'm puzzled, too, Jan      Richard Erlacher      09/19/06 08:57      
            2 different things      Jan Waclawek      09/19/06 11:49      
               au contraire      Erik Malund      09/19/06 11:53      
                  from the ISP point of view...      Jan Waclawek      09/19/06 12:13      
                     if you have "no reset and oscillator"      Erik Malund      09/19/06 12:29      
                        sure      Jan Waclawek      09/19/06 12:36      
                           Ok \"in-situ programming\" works but that is not ISP      Erik Malund      09/19/06 12:51      
                              Does this scheme actually work reliably?      Richard Erlacher      09/19/06 13:32      
                                 Guiness book?      Erik Malund      09/19/06 13:46      
                                    This all goes back to the "AT" in the part number      Richard Erlacher      09/19/06 14:59      
               Nothing magic with reset and oscillator      Kai Klaas      09/19/06 20:27      
                  I am talking about the rusty nail      Jan Waclawek      09/20/06 01:19      
                     Yes, here you are right!      Kai Klaas      09/20/06 08:10      
                        just helping      Erik Malund      09/20/06 08:42      
                           200      Steve M. Taylor      09/20/06 09:59      
                           not quite, but I like the idea      Jan Waclawek      09/20/06 11:50      
                           Exactly!      Kai Klaas      09/20/06 12:34      
                              ... and that's why I advocate for the 8032 version      Richard Erlacher      09/20/06 22:13      
                                 Stuff it        Steve M. Taylor      09/20/06 23:40      
                                    This will soon be moot      Erik Malund      09/21/06 07:05      
                                       Central Europe?      Jan Waclawek      09/21/06 07:28      
                                    Mistake...      Kai Klaas      09/21/06 08:06      
                                       you think so, I do not      Erik Malund      09/21/06 08:13      
                                          Better hope...      Kai Klaas      09/21/06 08:31      
                                             no love there      Erik Malund      09/21/06 08:44      
                                    Nothing is perfect...      Jan Waclawek      09/22/06 01:24      
                                       HUH      Erik Malund      09/22/06 06:27      
                                          waitaminute      Jan Waclawek      09/22/06 06:43      
                                             same desert      Erik Malund      09/22/06 06:56      
                                                it appears so      Jan Waclawek      09/22/06 07:00      
                                 male cow manure      Erik Malund      09/21/06 06:57      
                                    Eprom programmers are cheap and simple      Richard Erlacher      09/21/06 10:46      
                                       Cheaper than a $25 Atmel cable ?      Erik Malund      09/21/06 11:17      
                                          Yes, and widely applicable, too      Richard Erlacher      09/22/06 10:05      
                                             beware      Erik Malund      09/22/06 11:12      
                                                That's the usual line from an Asian vendor in U.S.      Richard Erlacher      09/22/06 14:09      
   fresh experience      Jan Waclawek      09/26/06 02:26      
      I am not going to vote 'off topic' but      Erik Malund      09/26/06 06:26      
         I am still just thinking aloud...      Jan Waclawek      09/26/06 07:27      
   just helping      Jez Smith      09/26/06 07:50      
   222 posts WOW!!      Jez Smith      09/26/06 07:51      
      EEEK! Why would you get that close?      Richard Erlacher      09/26/06 10:44      
         post number 224 and counting      Jez Smith      09/27/06 09:49      
            Well, I\'m a dog person ...      Richard Erlacher      09/27/06 11:37      
               226      Erik Malund      09/27/06 11:41      
                  tie a brick around his neck      Richard Erlacher      09/27/06 11:54      
                  %$#@! it happened again!      Richard Erlacher      09/27/06 11:55      
                     Programming Dogs      Jon Ledbetter      09/27/06 12:52      
                        230 tried it      Erik Malund      09/27/06 13:00      

Back to Subject List