Suspect Advice

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


In another thread someone wrote this...

 

Quote:

I had read from another reference (Make: AVR Programming by Elliot Williams) that hooking up the ADC power pins is not essential in order to get up and running...

 

...so I decide to go and check. Sure enough...

 

 

...with no value given for the capacitor unless you read on for another 6 pages.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Modern standard. A few years ago I submitted dozens of corrections to the author/publisher of a certain Arduino book all of which were accepted. He published his second edition before I got to submit the corrections for the last two thirds of the first edition. At that point I gave up in disgust. Caveat emptor.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ay there's the rub. Anyone can set themselves up as so called "expert" either in books or internet guides (latter more likely these days?). One only has to think of "MrLcd" to know how worryingly pervasive this kind of thing can be!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Anyone can set themselves up as so called "expert" either in books ...

In the old days, to get a book out you'd have to go to a publisher - and they would have a vested interest in checking that you knew what you were talking about, getting a decent proofreader, etc.

 

Nowadays, anyone can self-publish a book.

 

frown

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Go on.    There are plenty of crap books from regular Publishers.

 

Some Publishers are better than others.

 

Prior to the Internet,   computer books tended to be published by weight and number of pages.     This seemed to appeal to the customer.

 

In contrast,    K&R was clearly written with few pages and from a respected Publisher.

 

Nowadays,   any old dross appears on the Internet.    Both good and bad.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nah, we're just pedantic old farts! :) 

Datasheets? Bah! who needs 'em.

 

I cringe when watching some of Dave Jones teardown vids when the little voice inside my head says "errr....that's not quite right Dave". The other voice in my head says "give him some slack - he's putting it out there even if there is the odd mistake or two". Nevertheless, I cringe. I can only take Dave in short doses.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Anyone can set themselves up as so called "expert" either in books or internet guides

Like microchip.

From an application note I was reading yesterday (AVR1000)

 

"Code Listing 3-10 shows how the group mask relates to the bit masks. In reality, the
group mask values are pre-calculated in the header files, so the compiler does not
need to calculate the same constant over and over again.

#define TC_EVACT_gm (TC_EVACT2_bm | TC_EVACT1_bm | TC_EVACT0_bm)"

 

Nothing is calculated in the header file!

It's just macro text replacement.

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MrKendo wrote:
Nothing is calculated in the header file!
I see two OR operations. I think the point they are trying to make are that these will not be run-time ORs?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
I think the point they are trying to make are that these will not be run-time ORs?

Yes, I think that's probably what they meant - but it is certainly not what they said.

 

frown

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

clawson wrote:
MrKendo wrote:
Nothing is calculated in the header file!
I see two OR operations. I think the point they are trying to make are that these will not be run-time ORs?
The point about saving the compiler some work is still wrong.

Iluvatar is the better part of Valar.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

clawson wrote:

I see two OR operations. I think the point they are trying to make are that these will not be run-time ORs?

I agree that is the point they are making.

But it is misleading to say the value is pre-calculated in the header file, it implies there is something more magical going on than is actually going on.

The header in this case simply conatins a bunch of macros (#defines) which are expanded by the pre-processor, so what the compiler sees given for example

x = TC_EVACT_gm

is is something like

x = (0x01 | 0x02 | 0x04)

It's then the compiler that evaluates that expression. In this case it can all be evaluated at compile time.

Last Edited: Tue. Jul 21, 2020 - 01:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:

Nah, we're just pedantic old farts! :) 

Datasheets? Bah! who needs 'em.

 

I cringe when watching some of Dave Jones teardown vids when the little voice inside my head says "errr....that's not quite right Dave". The other voice in my head says "give him some slack - he's putting it out there even if there is the odd mistake or two". Nevertheless, I cringe. I can only take Dave in short doses.

 

His voice makes me cringe...

 

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

He is worse in person. He came to our hacker's meetup several years ago.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Poor Dave! We love you.... in small doses!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey!! you are talking bad about my neighbour.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Krupski wrote:
I can only take Dave in short doses.

+9999

 

Especially tiresome when the screeching is injected directly into my ears when I use PC headphones.

 

If his videos were shorter I would watch many more than I do because the majority are interesting.