Which tools do i need for development en debugging?

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

A a programmer i don't have a lot of experience with electronics, so the only way i can debug my work is by code. As a beginner in AVR and definitely electronics i wonder which tools i really need to make prototyping easier

 

And what are the tools and ways needed for debugging your electronics or schemas?

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

I guess we could fill a draft thesis answering that one, but in the simplest I guess an LED and current setting resistor would be a start, followed by a cheapie multimeter, a US$10 logic analyser. You should be able to cover most introductory tasks with that "kit".

 

At its simplest, you could turn ON the LED to indicate arrival at a new code segment and turn it OFF on departure from that segment. You could extend this "method" with various patterns of LED operation.

 

The multimeter and logic analyser usage should be obvious if you think about it. Of course sending progress messages back to your PC should be an obvious utility when coupled with a cheapie TTL to RS232 or USB converter.

 

Welcome to my side of the "science". cheeky

Ross McKenzie ValuSoft Melbourne Australia

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

valusoft wrote:
I guess we could fill a draft thesis answering that one,

 

A search of the site should fill up ones screen of threads on the subject.

 

I will repeat what has been said time and time and time....again.  Get an Arduino R3 for starters and use the Arduino IDE to get your feet wet  The serial monitor is a handy debug tool as you can insert serial prints in your code for notifications of where you are at.  These serials can be removed later.

 

Once you have the basics down like turning an LED on/off and other items you can then use the same board and then purchase an Atmel ICE and use studio to program the Arduino in C and utilise the real time debug capabilities of Studio and the ICE.

 

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Last Edited: Thu. Jul 20, 2017 - 01:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Agree - in this day and age start with Arduino then take it from there. All the "headaches" are ironed out before you start. No messing around trying to get programmers connected up and working and stuff like that.

 

If you want a "level above" maybe consider one of Atmel's "Xplained" boards that has both an AVR and a debugger all ready to go?

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

One part of making experimenting a lot easier is to use a breadboard.

Breadboards in itself are pretty unreliable, but that is offset by the very fast and convenient way to make and change connections.

 

If your budget allows it then a getting started kit with some buttons, leds, lcd display, wires etc is very nice for experimenting:

https://www.aliexpress.com/item/...

 

A big part of the unreliability of breadboards is because everything you connect to it constantly moves relative to the breadboard.

Reliability can be improved a lot if you glue the breadboard to a piece of wood and also glue a Lego base plate to that piece of wood.

Then glue small lego bricks to the bottom of your add-on boards so you can place them securely next to your breadboard.

 

 

And a Logic analyser is one of the greatest debug tools you want for debugging your hardware.

They are not USD 10 but only half of that nowadays :) Search Ali for "24M 8ch"

https://www.aliexpress.com/whole...

See the thread below to get an idea of the power you have with one of these things:

https://www.avrfreaks.net/forum/c...

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

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

The serial monitor is a handy debug tool as you can insert serial prints in your code for notifications of where you are at.

Main issue I see with this approch is that ... one never will know how to use a debugger (I have used (serial) printf /Fortran's print * / for many years, know xxx-gdb exist, and never felt it necessary -printing what is faulty is sufficient for me-. But, if a very serious bug occured, I would have to learn, under pressure, how to use itand  try to cope with a superficial knowledge....

If serial print is suboptimal and one get accustomed to only using it, it might be very annoying with a serious bug.

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

For a multimeter:

 

1. BK Precision 2704C. It has a lot of extra functions: logic, frequency, transistor tester, capacitance. The best value at the price point.

 

For a scope I have two ideas:

 

1. Velleman PCSU1000

 

2. Bitscope Micro

 

The PCSU1000 is probably easier to use but the Bitscope Micro gives you a protocol analyzer which is really nice when you are working with SPI. I have also heard that you can make your own scope with an Arduino or the sound card in your PC. Never tried it though.

 

You can build your own power supply  with 337/317 regulators. Search the UCSB.edu website. There is a schematic with detailed instructions. (No, I have never been there, but I am a graduate of Santa Cruz).

 

 

 

 

 

 

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

Your question in your first post is to general for a detailed answer.

The tools you need are very much dependent on the jobs you want to do.

It also depends a lot on the amount of money you want to invest.

Often you can save yourself a lot of time and/or frustration by investing more money in tools upfront.

Are you a low budget / hobby type of guy, or do you want a more luxorious / professional setup?

 

eevblog-954-how-to-setup-an-electronics-lab-for-300

https://www.eevblog.com/2016/12/...

 

Also watch Dave's review of a USD 25 DMM the AN8008.

When dealing with electronics you often want more than one DMM.

It is not uncommon to need 4 DMM 's simultaneously.

For example when you want to measure voltage and current of a SMPS on the input and output.

As all cheap DMM's not fit for mains duty, but great for the hobby / electronics bench.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com