Selection of a suitable microcontroller

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

Hello,

I am a begginer. I want to make a integrated system with a microcontroller which will read the pins of an other microcontroller and can send him input signals too.I want my microcontroller to have usb support as he will communicate with the computer via usb.Can you suggest me a processor(preferably avr family or arm) or what features of the microprocessor should i look for so that my system is fast and functional as i have to control 40 pins (for example) of the other microprocessor ?

 

I also have a question. Why do various programmers use microcontrollers that they do not support usb?(I have an arduino with atmega328p which i noticed doesn't support usb)

Thank you.

This topic has a solution.
Last Edited: Sun. Nov 22, 2020 - 03:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yin wrote:
Why do various programmers use microcontrollers that they do not support usb?

Because they don't need it!

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

USB is a PAIN in microcontrollers.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

yin wrote:
Why do various programmers use microcontrollers that they do not support usb?

awneil wrote:
Because they don't need it!

 

To expand on this a little.

As Andy correctly noted, if you do not need USB, why PAY for it, and then have to write code to disable it to cut down on power for example.

 

The other thing is, in some cases, it's easier(and possibly cheaper) to use an external USB to USART chip than to write the code and deal with the processing overhead of having USB on board.

 

yin wrote:
I am a begginer.

Welcome to AVRfreaks!

 

yin wrote:
I want to make a integrated system with a microcontroller which will read the pins of an other microcontroller and can send him input signals too.I want my microcontroller to have usb support as he will communicate with the computer via usb.Can you suggest me a processor(preferably avr family or arm) or what features of the microprocessor should i look for so that my system is fast and functional as i have to control 40 pins (for example) of the other microprocessor ?

 

You want to use an ARM possibly?  How much of a beginner are you?

 

Your project sounds confusing.  I would suggest that you sit down and think about the project and what you want to accomplish.  Why would you want to read the pins of the other microcontroller?  If it is to exchange information, then thats what USARTS, or SPI are good for.....use A LOT less pins too.

 

I would suggest you post what EXACTLY you want to do and then we can help you with that goal.

 

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

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

Thank you all for your anwsers.

I have make about 3-4 projects and now i am still learning basic things in the field.Me puprpose is the following:I want remote communicate with my  integrated system via FTDI(i will not make this part so i dont know so much yet).I will send commands to my integrated system to programm an other microcontroller and read some pins which i will choose(and some other fuctionalities).In essence i want my integrated circuit have the ability to programm and testing an other microcontroller and send me feedback to me.I have no problem work with usb although is complicated because i want improve my skills and i have work already work with uart and spi in the previous projects.So i try to find a microcontroller to satisfy the previous.(Also I want to not have to write usb drivers myself)

Thank you again :)

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

Sounds like you want an Arduino board. There's plenty to choose from. Prototype your project, then you can do a custom pcb if you want.

 

If you want cheap, maybe a 'blue pill' board?

 

 

 

 

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

In essence i want my integrated circuit have the ability to program and testing an other microcontroller

Why?  Have you already run out of project ideas?  What have you made so far?  Making another programmer (when you already have one)...seems rather blase`.

 

Maybe one of these will be more interesting

https://people.ece.cornell.edu/l...

 

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

yin wrote:
Can you suggest me a processor(preferably avr family or arm) or what features of the microprocessor should i look for so that my system is fast and functional as i have to control 40 pins (for example) of the other microprocessor ?
A relatively early USB megaAVR or a USB XMEGA that has enough pins.

yin wrote:
Why do various programmers use microcontrollers that they do not support usb?
USB is a mid-complexity peripheral that a programmer has to locate and comprehend a USB stack (pipes, classes) or roll their own (packets); easier and sometimes less expensive to attach a USB UART or USB MCU.

 


Teensy++2.0 | PJRC Store

AT90USB1286 - 8-bit AVR Microcontrollers

AVR MCUs | Microchip Technology

[top of right column]

View our Quick Reference Guide to get a quick overview of Microchip's 8-bit AVR portfolio, peripheral integration, and migration options.

 

"Dare to be naïve." - Buckminster Fuller

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

Thank you all again for your advices.

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

If you are a beginner then I suggest using an Arduino UNO or Nano.   These are CPU module boards based on the Atmel/Microchip AVR Mega328P.  They use the PC's USB jack to connect to the PC to the Arduino.  The Nano only costs about $3.50 on eBay.  I suggest getting several in case you burn one up (not likely) or burn off the VIA pad holes (more likely).

 

Nothing is easy in embedded systems for the beginner.  But the Arduino Nano or UNO is the easiest and most reliable of all the "nothing is easy" options.  There are tutorials on the web for Arduino beginners that have been written for every level.  You can do anything with the Mega328P that is on the Nano that you can with the more professional compilers.   Anyone on this website that disparages Arduino is most likely a senior embed-systems engineer who has been doing this for 30 years and has forgotten how difficult this subject really is for beginners.

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

yin wrote:

Thank you all for your anwsers.

I have make about 3-4 projects and now i am still learning basic things in the field.Me puprpose is the following:I want remote communicate with my  integrated system via FTDI(i will not make this part so i dont know so much yet).I will send commands to my integrated system to programm an other microcontroller and read some pins which i will choose(and some other fuctionalities).In essence i want my integrated circuit have the ability to programm and testing an other microcontroller and send me feedback to me.I have no problem work with usb although is complicated because i want improve my skills and i have work already work with uart and spi in the previous projects.So i try to find a microcontroller to satisfy the previous.(Also I want to not have to write usb drivers myself)

Thank you again :)

This seems a little confusing. You do not want to write USB drivers, and have already UART and SPI. However, even USB libraries can be tricky to get working with other software, as USB is resource critical. You end up with less than a whole MCU for your own project.

 

If you already have FTDI parts (USB-UART bridges) then any MCU with a UART can talk to that.

for low volumes, you may be best to start with small modules, to get your code developed 

 

The XMINI and XNANO series include debug support, and there are many USB-UART modules out there. (FTDI, SiLabs CP2102N, Wch CH340, etc)

 

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


Who-me wrote:
there are many USB-UART modules out there. (FTDI, SiLabs CP2102N, Wch CH340, etc)

 

I second that. The bridge chip manufacturer will also provide drivers for different OSes.

One thing to pay attention, though, is the I/O level of the bridge, don't burn your I/O pins by connecting a 5V bridge to a 3.3V MCU!

Always check the datasheet of the bridge chip and verify the voltage with a scope.

 

Note: Arduino clones already come with a bridge included. I highly recommend Arduino Nano clones for beginners. However be aware some have fake AVRs  https://hackaday.com/2020/09/15/deep-sleep-problems-lead-to-forensic-investigation-of-troublesome-chip/

Last Edited: Sat. Nov 21, 2020 - 12:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yin wrote:
Why do various programmers use microcontrollers that they do not support usb?

another problem with using the microcontroller's USB - particularly while developing - is that rebooting the MCU will restart the USB; so you lose comms while the Host re-enumerates.

 

I imagine that it also makes debugging problematic - as halting the CPU would also stop[ the USB stack ?

 

Brought to memory by: https://www.avrfreaks.net/commen...

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...