Searching \ for '[PIC]: stupid mistakes' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'stupid mistakes'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: stupid mistakes'
2005\10\02@143922 by Wouter van Ooijen

face picon face
Part II of my most stupid [PIC] mistakes.

I am trying to read an ADXL two-axis accelerometer. It outputs 2.5V +/-
0.3V, so to increase the A/D resolution I use 2.0 as -ref and 3.0 as
+ref. But I only got either 000 or 3FF as A/D reading. I was totally
flabbergasted, untill I re-checked which pin is -ref and which +ref. I
had of course switched the pins.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\10\02@170718 by Jinx

face picon face
I spent half of Friday trying to figure out why an F88 would make
a pin oscillate on power-up, when it had been fine previously. The
problem seemed to be related to calling a certain routine, that I
could fine nothing wrong with. Despite changing variable names
and order, looking through the manual and code until I was just
so fed up. Then it dawned on me - last thing Thursday night I'd
added a dt statement, ORGed at 0x600. The little bit of call code
had pushed END past the programmer's range (0-2ff) as well, so
the s/w was just jumping into space, missing a routine that wasn't
even there

You really need that sort of stuff don't you

2005\10\02@172926 by olin piclist

face picon face
Wouter van Ooijen wrote:
> I am trying to read an ADXL two-axis accelerometer. It outputs 2.5V
> +/-
> 0.3V, so to increase the A/D resolution I use 2.0 as -ref and 3.0 as
> +ref. But I only got either 000 or 3FF as A/D reading. I was totally
> flabbergasted, untill I re-checked which pin is -ref and which +ref. I
> had of course switched the pins.

Also don't you need a minimum of 2V(?) from Vref- to Vref+ even if they are
otherwise within range?


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\10\02@173516 by olin piclist

face picon face
Jinx wrote:
> I spent half of Friday trying to figure out why an F88 would make
> a pin oscillate on power-up, when it had been fine previously. The
> problem seemed to be related to calling a certain routine, that I
> could fine nothing wrong with. Despite changing variable names
> and order, looking through the manual and code until I was just
> so fed up. Then it dawned on me - last thing Thursday night I'd
> added a dt statement, ORGed at 0x600. The little bit of call code
> had pushed END past the programmer's range (0-2ff) as well, so
> the s/w was just jumping into space, missing a routine that wasn't
> even there

If you'd used the linker, it would have told you something didn't fit.
However, I don't know what you mean about the "programmer's range".  The
16F88 has 4K words of program memory which extend from 0 to 7FFh.  There is
nothing special about 2FF which is somewhere in the middle of page 0.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\10\02@175648 by Jinx

face picon face
> However, I don't know what you mean about the "programmer's
> range"

To minimise programming time the PS+ upper limit was set to
2ff, not the full fff. The dt addition I made at 0x600 was therefore
not programmed into the chip, so there were no retlws for the
calls to bounce back from

2005\10\02@193354 by olin piclist

face picon face
Jinx wrote:
> To minimise programming time the PS+ upper limit was set to
> 2ff, not the full fff. The dt addition I made at 0x600 was therefore
> not programmed into the chip, so there were no retlws for the
> calls to bounce back from

I thought MPLAB can set the programming range automatically.  I haven't used
the Picstart+ in years, but I know it works that way with the ICD2.  Even
then it makes me wonder about the Picstart+.  A full 16F88 takes less than
15 seconds to program with two verify passes, and I know the Picstart+ only
does one.  Also, there is no reason the programmer can't automatically skip
words set to the erased value.  Any memory address limit would therefore
only apply to the single verify pass, which can't save much.  Or the
Picstart+/MPLAB combination is very poorly implemented.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\10\02@202806 by Jinx

face picon face
> I thought MPLAB can set the programming range automatically

Might be wrong but I don't believe it can, not with the PS+ AFAIK

> A full 16F88 takes less than 15 seconds to program with two
> verify passes

> there is no reason the programmer can't automatically skip words
> set to the erased value.  Any memory address limit would therefore
> only apply to the single verify pass, which can't save much.

> Or the Picstart+/MPLAB combination is very poorly implemented

The PS+ is a very old design and slow as a wet week, although I'd
have though the introduction of the PUM would have improved
performance. Normally I get by, but a current job with an F452 is
frustrating at times. It takes 90 seconds to program 0 -> 401F. It
also takes the fun out of coding

If anyone knows that the PS+ can go faster, I'd like hear from them.
It could be simply that I've not read all the documentation

A second programmer is definitely on the shopping list (apart from
anything else, I have projects using mixed micros and even with ICSP
there's still too much cable swapping)

2005\10\02@221951 by Chen Xiao Fan

face
flavicon
face
I assume you are doing professional jobs so price of
above US$100 will be okay. For that MPLAB ICD2 (US$155),
Promate III (US$895) and ProProg (US$295) can be considered
if PS+ (US$199) is not up to the task.

MPLAB ICD2 is pretty good to program the PICDEM2+ with
18F452 I am experimenting now. Still I have no big example
to fill the whole 18F452 so I am not so sure if it is faster
than PS+ or not. Be sure to buy the original or the
full-blown clones in this case.

Promate 3 is pretty fast but it costs US$895 so Olin's
ProProg (US$295) may be a better deal as long as your chip
is supported (I think most 18Fs/dsPICs are supported by
ProProg). I have only used PM3 with some 16F chips
so I am not so sure whether PM3 is much faster than PS+.
I think Olin should have data for ProProg.

I do not have a PS+ but maybe you can try picp. Jeff Post
is now maintaining the picp program under Linux/Windows.
Picp supports Warp13 (up to the last publicly available
firmware), JuPIC and PS+.  Maybe you can try picp
for PS+ to see if it is better for you.
http://home.pacbell.net/theposts/picmicro

By the way, Jeff is now working on pk2, a command line
utility to work with MicroChip's PICkit2 programmer
under Linux (and Windows). PICkit 2 (US$35) should be
able to support 18F chips late this year. But compared
to ICD2/PM3/PS+, it is certainly less powerful.

As a side note, the author of the following programmer
claims to have very fast programming but I have no
experience with it.
http://home.arcor.de/bernhard.michelis/

Regards,
Xiaofan


{Original Message removed}

2005\10\02@224946 by Jinx

face picon face
> From: "Chen Xiao Fan"

Thanks for taking the trouble to list those programmers. One
good thing about the PS+ is that it always works. Never had
a PIC it couldn't do. I feel for those who've built something
cheap off the web and had troubles (had that myself with the
Fluffy2, not fun)

2005\10\02@230955 by Chen Xiao Fan

face
flavicon
face
PS+ does not support the 18F USB parts like 18F2550 and
18F4550 as yet. It also does not support some new 18Fs like
18F6525. It does not support dsPICs as well. In this
aspect, ICD2 is better. However ICD2 is a pain to use
for some ICSP applications and chips like 16F629/675
which requires Vpp before Vdd. Anyway I think PS+
will support more chips later.

So maybe Olin's ProProg is a good choice for you even though
I have no experience with it.

Regards,
Xiaofan

-----Original Message-----
From: Jinx [spam_OUTjoecolquittTakeThisOuTspamclear.net.nz]
Sent: Monday, October 03, 2005 10:50 AM
To: Microcontroller discussion list - Public.
Subject: Re: [PIC]: stupid mistakes

Thanks for taking the trouble to list those programmers. One
good thing about the PS+ is that it always works. Never had
a PIC it couldn't do. I feel for those who've built something
cheap off the web and had troubles (had that myself with the
Fluffy2, not fun)

2005\10\03@003436 by Jinx

face picon face
> Anyway I think PS+ will support more chips later

I'm surprised dsPICs aren't already (although they might
be - after a look around MC's site I haven't found the
PUM download), but I've no application for them yet so
that's not important right now

2005\10\03@014738 by Wouter van Ooijen

face picon face
> Also don't you need a minimum of 2V(?) from Vref- to Vref+
> even if they are otherwise within range?

Correct. But the only thing I need from the A/D is resolution and
monotonicity, so I just tried with this smaller range and it seems to be
OK.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\10\03@063039 by Vasile Surducan

face picon face
On 10/2/05, Wouter van Ooijen <.....wouterKILLspamspam@spam@voti.nl> wrote:
> Part II of my most stupid [PIC] mistakes.
>
> I am trying to read an ADXL two-axis accelerometer. It outputs 2.5V +/-
> 0.3V, so to increase the A/D resolution I use 2.0 as -ref and 3.0 as
> +ref. But I only got either 000 or 3FF as A/D reading. I was totally
> flabbergasted, untill I re-checked which pin is -ref and which +ref. I
> had of course switched the pins.

Still have doubts that you have the entire 10 bit resolution. I think not.
In fact I'm sure.
:)

cheers,
Vasile

2005\10\03@070030 by Wouter van Ooijen

face picon face
> Still have doubts that you have the entire 10 bit resolution.
> I think not. In fact I'm sure.

It seems I do get the resolution. Probably not the linearity, but I
don't need that.

What makes you sure?

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu



2005\10\03@075504 by olin piclist

face picon face
part 1 1314 bytes content-type:text/plain; (decoded 7bit)

Chen Xiao Fan wrote:
> Promate 3 is pretty fast but it costs US$895 so Olin's
> ProProg (US$295) may be a better deal as long as your chip
> is supported (I think most 18Fs/dsPICs are supported by
> ProProg).

All the 30Fs are, and most of the mainstream 18F and 16F, but there are
still some missing.  I've attached my list of what is not yet supported.

> I have only used PM3 with some 16F chips
> so I am not so sure whether PM3 is much faster than PS+.
> I think Olin should have data for ProProg.

I've usually tried to pay attention to performance within reason.  Some
things I thought were just too much trouble for the limited return, like
multiple simultaneous panel writes on a 18F252.  Still, I think you'll find
my programmers are a good chunk faster than a Picstart+.  I think my
grandmother would be faster toggling in the bits by hand.  For example I
remember that I can program a full 16F88 in about 14 seconds, which is twice
as fast as a Picstart+ if I understood Jinx correctly.

When I get back to my real office this afternoon I'll try to run some tests
and publish the results.  Actually it would be nice to compare various
programmers.  I'll make the HEX files I use available so that we can have a
good apples to apples comparison.


part 2 728 bytes content-type:text/plain;
(decoded 7bit)

Flash PICs not supported by the ProProg
---------------------------------------

12F508    DS41227D
  509

16F54     DS41207C

16F57     DS41208B
  59     DS41243A

16F72     DS39588A

16F73     DS30324B
  74
  76
  77

16F83*    DS30262E
16F84*
16F84A

16F505    DS41226E

16F737    DS30492B
  747
  767
  777

16F785    DS41237A

16F818    DS39603C
  819

16F913    DS41244B
  914
  916
  917

18F2331   DS30500A
  2431
  4331
  4431

18F6310   DS39624B
  6390
  6410
  6490
  8310
  8390
  8410
  8490


18F6525   DS30499B
  6621
  8525
  8621

18F6527   DS39643B
  6622
  6627
  6722
  8527
  8622
  8627
  8722

18F6585   DS39606C
  6680
  8585
  8680


part 3 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2005\10\03@075809 by olin piclist

face picon face
Jinx wrote:
> Thanks for taking the trouble to list those programmers. One
> good thing about the PS+ is that it always works. Never had
> a PIC it couldn't do. I feel for those who've built something
> cheap off the web and had troubles (had that myself with the
> Fluffy2, not fun)

I didn't think the Picstart+ supported dsPICs, but I haven't looked in a
while.

I've heard talk of a lot of homebrew programmers here, but "Fluffy2" is new
to me.  Strange name, does it cough up hairballs a lot or something?


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\10\03@081525 by Wouter van Ooijen

face picon face
> I've heard talk of a lot of homebrew programmers here, but
> "Fluffy2" is new
> to me.  Strange name, does it cough up hairballs a lot or something?

IIRC it is about the only intelligent-class progger that does SX chips.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\10\03@085352 by Xiaofan Chen

face picon face
>From the following post, most likely 18F2550/4550
will be supported later.
http://forum.microchip.com/tm.asp?m=111109

PS+ does not support any dsPICs.

Regards,
Xiaofan

>From Readme for PICSTART+ under MPLAB 7.21.
-----------------------------------------------------------------
1. Device Support List
-----------------------------------------------------------------

               Supported in                       Supported in
Device          OS (FW) Version    Device          OS (FW) Version
-------------   ---------------    -------------   ---------------
PIC10F200!      (04.30.00)         PIC16F690*      (04.10.06)
PIC10F202!      (04.30.00)         PIC16F716       (04.10.00)
PIC10F204!      (04.30.00)         PIC16F72        (02.10.01)
PIC10F206!      (04.30.00)         PIC16F73        (02.10.01)
PIC10F220*      (04.30.01)         PIC16F737       (04.10.00)
PIC10F222*      (04.30.01)         PIC16F74        (02.10.01)
PIC12C508       (02.01.00)         PIC16F747       (04.10.00)
PIC12C508A      (02.01.00)         PIC16F76        (02.10.01)
PIC12C509       (02.01.00)         PIC16F767       (04.10.00)
PIC12C509A      (02.01.00)         PIC16F77        (02.10.01)
PIC12C671       (02.01.00)         PIC16F777       (04.10.00)
PIC12C672       (02.01.00)         PIC16F785*      (04.40.00)
PIC12CE518      (02.01.00)         PIC16F818!      (03.00.07)
PIC12CE519      (02.01.00)         PIC16F819!      (03.00.07)
PIC12CE673      (02.01.00)         PIC16F83        (02.01.00)
PIC12CE674      (02.01.00)         PIC16F84        (02.01.00)
PIC12F508       (04.30.00)         PIC16F84A       (02.01.00)
PIC12F509       (04.30.00)         PIC16F87        (04.10.00)
PIC12F510*      (04.30.00)         PIC16F870       (02.01.00)
PIC12F629       (03.00.07)         PIC16F871       (02.01.00)
PIC12F635       (04.20.03)         PIC16F872       (02.01.00)
PIC12F675       (03.00.07)         PIC16F873       (02.01.00)
PIC12F683       (04.02.00)         PIC16F873A      (03.00.07)
PIC16C505       (02.01.00)         PIC16F874       (02.01.00)
PIC16C54        (02.01.00)         PIC16F874A      (03.00.07)
PIC16C54C       (02.01.00)         PIC16F876       (02.01.00)
PIC16C55        (02.01.00)         PIC16F876A      (03.00.07)
PIC16C554       (02.01.00)         PIC16F877       (02.01.00)
PIC16C558       (02.01.00)         PIC16F877A      (03.00.07)
PIC16C55A       (02.01.00)         PIC16F88        (04.10.00)
PIC16C56        (02.01.00)         PIC16F913*      (04.40.01)
PIC16C56A!      (02.01.00)         PIC16F914*      (04.40.01)
PIC16C57        (02.01.00)         PIC16F916*      (04.40.01)
PIC16C57C!      (02.01.00)         PIC16F917*      (04.40.01)
PIC16C58A       (02.01.00)         PIC16F946*      (04.40.01)
PIC16C58B       (02.01.00)         PIC16HV540      (02.01.00)
PIC16C620       (02.01.00)         PIC17C42        (02.01.00)
PIC16C620A      (02.01.00)         PIC17C42A       (02.01.00)
PIC16C621       (02.01.00)         PIC17C43        (02.01.00)
PIC16C621A      (02.01.00)         PIC17C44        (02.01.00)
PIC16C622       (02.01.00)         PIC17C752       (02.01.00)
PIC16C622A      (02.01.00)         PIC17C756       (02.01.00)
PIC16C62A       (02.01.00)         PIC17C756A      (02.01.00)
PIC16C62B       (02.01.00)         PIC17C762       (02.01.00)
PIC16C63        (02.01.00)         PIC17C766       (02.01.00)
PIC16C63A       (02.01.00)         PIC18C242       (02.01.00)
PIC16C642       (02.01.00)         PIC18C252       (02.01.00)
PIC16C64A       (02.01.00)         PIC18C442       (02.01.00)
PIC16C65A       (02.01.00)         PIC18C452       (02.01.00)
PIC16C65B       (02.01.00)         PIC18C658       (02.01.00)
PIC16C66        (02.01.00)         PIC18C858       (02.01.00)
PIC16C662       (02.01.00)         PIC18F1220#*    (04.10.00)
PIC16C67        (02.01.00)         PIC18F1320*#    (04.10.00)
PIC16C71        (02.01.00)         PIC18F2220      (04.02.00)
PIC16C710       (02.01.00)         PIC18F2320      (04.02.00)
PIC16C711       (02.01.00)         PIC18F2331*!    (04.02.00)
PIC16C712       (02.01.00)         PIC18F2410      (04.30.01)
PIC16C715       (02.01.00)         PIC18F242       (02.30.01)
PIC16C716       (02.01.00)         PIC18F2420      (04.30.01)
PIC16C717       (02.10.01)         PIC18F2431*!    (04.02.00)
PIC16C72        (02.01.00)         PIC18F2455      (04.30.01)
PIC16C72A       (02.01.00)         PIC18F248       (02.30.01)
PIC16C73A       (02.01.00)         PIC18F2480*     (04.30.03)
PIC16C73B       (02.01.00)         PIC18F2510      (04.30.01)
PIC16C745       (02.01.00)         PIC18F2515      (04.30.01)
PIC16C74A       (02.01.00)         PIC18F252       (02.30.01)
PIC16C74B       (02.01.00)         PIC18F2520      (04.30.01)
PIC16C76        (02.01.00)         PIC18F2525      (04.30.01)
PIC16C765       (02.01.00)         PIC18F258       (02.30.01)
PIC16C77        (02.01.00)         PIC18F2580*     (04.30.03)
PIC16C770       (02.10.01)         PIC18F2585      (04.30.01)
PIC16C771       (02.10.01)         PIC18F2610      (04.30.01)
PIC16C773       (02.01.00)         PIC18F2620      (04.30.01)
PIC16C774       (02.01.00)         PIC18F2680      (04.30.01)
PIC16C781       (02.30.00)         PIC18F4220      (04.02.00)
PIC16C782       (02.30.00)         PIC18F4320      (04.02.00)
PIC16C923       (02.01.00)         PIC18F4331      (04.02.00)
PIC16C924       (02.01.00)         PIC18F4410      (04.30.01)
PIC16C925       (02.01.00)         PIC18F442       (02.30.01)
PIC16C926       (02.01.00)         PIC18F4420      (04.30.01)
PIC16CE623      (02.01.00)         PIC18F4431      (04.02.00)
PIC16CE624      (02.01.00)         PIC18F4455      (04.30.01)
PIC16CE625      (02.01.00)         PIC18F448       (02.30.01)
PIC16F505       (04.30.00)         PIC18F4480*     (04.30.03)
PIC16F506*      (04.30.00)         PIC18F4510      (04.30.01)
PIC16F54        (04.02.00)         PIC18F4515      (04.30.01)
PIC16F57!       (04.02.00)         PIC18F452       (02.30.01)
PIC16F627       (02.10.01)         PIC18F4520      (04.30.01)
PIC16F627A      (04.10.00)         PIC18F4525      (04.30.01)
PIC16F628       (02.10.01)         PIC18F458       (02.30.01)
PIC16F628A      (04.10.00)         PIC18F4580*     (04.30.03)
PIC16F630       (03.00.06)         PIC18F4585      (04.30.01)
PIC16F636       (04.12.04)         PIC18F4610      (04.30.01)
PIC16F639*      (04.10.06)         PIC18F4620      (04.30.01)
PIC16F648A      (04.10.00)         PIC18F4680      (04.30.01)
PIC16F676       (03.00.06)         PIC18F6620!     (03.00.07)
PIC16F684       (04.10.00)         PIC18F6720!     (03.00.07)
PIC16F685*      (04.10.06)         PIC18F8620!     (03.00.07)
PIC16F687*      (04.10.06)         PIC18F8720!     (03.00.07)
PIC16F688       (04.10.00)         rfPIC12C509AF!  (02.01.00)
PIC16F689*      (04.10.06)         rfPIC12C509AG!  (02.01.00)


*  Indicates beta-support part(s) in this release.

!  See Sections 7-12 in this readme for information on programming
  these devices.

#  Some revisions of these parts fail to program.

#  Some revisions of these parts fail to program.

On 10/3/05, Olin Lathrop <olin_piclistspamKILLspamembedinc.com> wrote:

>
> I didn't think the Picstart+ supported dsPICs, but I haven't looked in a
> while.
>

2005\10\03@104956 by Xiaofan Chen

face picon face
That would be nice and I can test PM3 for some of the 16F and 18F
chips I have. I am now using serial port for Promate 3.

Regards,
Xiaofan

On 10/3/05, Olin Lathrop <.....olin_piclistKILLspamspam.....embedinc.com> wrote:

>
> When I get back to my real office this afternoon I'll try to run some tests
> and publish the results.  Actually it would be nice to compare various
> programmers.  I'll make the HEX files I use available so that we can have a
> good apples to apples comparison.
>

2005\10\03@164835 by Jinx

face picon face
> I can program a full 16F88 in about 14 seconds, which is
> twice as fast as a Picstart+ if I understood Jinx correctly

More than 3x. I think the logic MC used has real glue in it

Then again, the PS+ pre-dates flash PICs so you have to make
some allowances. At the time I got mine the F84 had just been
released, and it was a blessed relief to switch from EPROM /
OTP Motorolas. I'm grateful to have had a programmer that's
been of good service for many many years, but it's lagging
behind the competition now



2005\10\03@164951 by Barry Gershenfeld

face picon face

>Jinx wrote:
>>To minimise programming time the PS+ upper limit was set to
>>2ff, not the full fff. The dt addition I made at 0x600 was therefore
>>not programmed into the chip, so there were no retlws for the
>>calls to bounce back from
>Olin wrote:
>I thought MPLAB can set the programming range automatically.  I haven't used
>the Picstart+ in years, but I know it works that way with the ICD2.

Been there, done that, lived through history...

- Set program limit to 7FF so 16F877 wouldn't take so long.
- Program eventually got bigger than that.  Debugging with ICD would show
"I'm at 97C and having fun executing all these 3F's..."
- Fixed programming limit and wondered if MPLAB could look out for this.
- MPLAB upgraded to look out for this.
- 16F877A released, but we only had an ICD-1.
- "A" chips priced below originals, we switched, and got an ICD2.
- "A" chips program so fast we no longer care about "shorting" the program
space.
- MPLAB now autocalculates the range...

Progress...

Barry
 ... now using 18F6621, so that we can have programs so big that
programming time is becoming significant again!

2005\10\03@234138 by PicDude

flavicon
face
Did you mean +2.0V and +3.0V ?  Which PIC?  I remember some PICs require 2.0V
minimum separation between Vref+ and Vref-.

Cheers,
-Neil.



On Sunday 02 October 2005 01:39 pm, Wouter van Ooijen scribbled:
{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...