Author Topic: Approach to a new uC (or anything else really)  (Read 1407 times)

0 Members and 1 Guest are viewing this topic.

Offline ppTRNTopic starter

  • Regular Contributor
  • *
  • Posts: 124
  • Country: it
Approach to a new uC (or anything else really)
« on: April 17, 2023, 02:44:53 pm »
Hi everyone, with the announcement of Arduino UNO rev 4 i started digging into the RA4M1 datasheet and user manual. It is a very long document, more than 1.4k pages. I am going to study it very slowly since i will not really have to use that uC other than for didactic and teaching purposes.

But let'say you work at a company and they inform you that from now on they will develop a new line of product based on a new microcontroller that you have never heard of, or they decide to switch from PIC to STM32, how do you approach this kind of changes? Do you download the User Manual, print it, and start studying it for page 1? Do you attend formative sessions with the prodoucer of the new hardware? Or do you just stick to your needs, so you'll study and comprehend the new component as problems arises?   
 

Offline n4u

  • Contributor
  • Posts: 34
  • Country: pl
Re: Approach to a new uC (or anything else really)
« Reply #1 on: April 17, 2023, 02:55:43 pm »
It depends - when your soft is bare metal u need to read DS, when u using libraries u need to reads libraries DS.
Anyway - u should swap on purpose - for some project / feature - make it and read DS when u dont know somethink / use google etc - learning only for learning make you forgot
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11725
  • Country: us
    • Personal site
Re: Approach to a new uC (or anything else really)
« Reply #2 on: April 17, 2023, 08:47:50 pm »
Reading the whole datasheet is pointless, don't do it. Skimming though it and getting the general overview of the device and overall features it very useful. But there will be a lot of features you will never use. No point in reading about them. Read the general overview and then just feature list of all the peripherals.

The best way to start using the device is write practical code. Start with blinking an LED with software delays. This is enough to figure out how the clocks and GPIOs work. Then add timer delays, you will know about timers. Then add UART and print some strings. All this is enough to start developing meaningful applications.

And while doing all this, you will know what parts you need to read.

And the more you do this, the better you will know which parts of the document to read right away and which are better left for later.

I did this for RA4M1 when this board was announced, and on a quick look it seemed like an interesting device. Not interesting enough to buy the ICs and make a custom board, but I will pick up on of the Arduino boards to play with it.
« Last Edit: April 17, 2023, 08:50:28 pm by ataradov »
Alex
 

Offline barshatriplee

  • Regular Contributor
  • *
  • !
  • Posts: 130
  • Country: bd
Re: Approach to a new uC (or anything else really)
« Reply #3 on: April 18, 2023, 01:19:11 am »
In such cases, it's necessary to download the datasheet of the new chip at the very beginning. It may not be always necessary to go through each and every page. You can study the pages that deal with the particular components you need to configure. For example, if you need to use analog pins, you have to study the chapters dedicated to the ADC.  Similarly, you may need to study the I2C bus, USART etc. depending on your application.
 

Offline ppTRNTopic starter

  • Regular Contributor
  • *
  • Posts: 124
  • Country: it
Re: Approach to a new uC (or anything else really)
« Reply #4 on: April 18, 2023, 07:15:41 am »

The best way to start using the device is write practical code. Start with blinking an LED with software delays. This is enough to figure out how the clocks and GPIOs work. Then add timer delays, you will know about timers. Then add UART and print some strings. All this is enough to start developing meaningful applications.

And while doing all this, you will know what parts you need to read.

This is good, that's actually how I do it. I just wanted to confront my way to your guys way to figure out which method is best
 

Offline Infraviolet

  • Super Contributor
  • ***
  • Posts: 1150
  • Country: gb
Re: Approach to a new uC (or anything else really)
« Reply #5 on: April 18, 2023, 09:45:19 pm »
Seems pretty silly to name the new Arduino as an "Uno" when it uses a completely different type of chip (ARM Cortex rather than AVR) to the classic Uno.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11725
  • Country: us
    • Personal site
Re: Approach to a new uC (or anything else really)
« Reply #6 on: April 18, 2023, 10:13:17 pm »
Seems pretty silly to name the new Arduino as an "Uno" when it uses a completely different type of chip (ARM Cortex rather than AVR) to the classic Uno.
Not really, this is their new mainline board, it should have mainline branding. If this board ends up being cheap enough, they would be able to move everyone from AVR. That has to be their plan.
Alex
 

Offline dobsonr741

  • Frequent Contributor
  • **
  • Posts: 696
  • Country: us
Re: Approach to a new uC (or anything else really)
« Reply #7 on: April 19, 2023, 02:01:37 am »
Maybe it’s time to evaluate if you/the company have used bare metal features, and move away from them to rely on standard/abstract library coverage. Hopefully the RA4M1 has horsepower to make up the losses of getting away from the baremetal style.
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 813
  • Country: us
Re: Approach to a new uC (or anything else really)
« Reply #8 on: April 21, 2023, 01:44:55 am »
Just look at the ports, how their pins are used, what else they can do.  Understand the basic architecture.   Know how the clocks work, etc.

Beyond that, if both chips can use the Arduino libs, programming them isn't horribly different.
 

Offline RJSV

  • Super Contributor
  • ***
  • Posts: 2378
  • Country: us
Re: Approach to a new uC (or anything else really)
« Reply #9 on: April 22, 2023, 09:05:35 pm »
   (Maybe an older approach):
   When granted a new job, employer 'required' detailed study of the IC, by recommending a book that had both hardware and software intro, for the uP.  That meant the memory mapping and I/O ports mapping, with some basic examples in the book.
   I think that the mapping of things, and explanation of formats, such as '16 bit word size, transfered all at once' and such as 'Ram uses (up to) 20 bits for addresses', and some details on how to transfer address out from IC to RAM interface.

   So, I guess I'm saying that the mapping features are a key aspect, whether interested in hardware design, or in writing software.
 
The following users thanked this post: ppTRN

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7909
  • Country: nl
  • Current job: ATEX product design
Re: Approach to a new uC (or anything else really)
« Reply #10 on: April 22, 2023, 09:39:16 pm »
Wow they went with Renesas? Thats a weird choice IMHO, I always get these vibes from that company that they don't want my business. I guess someone got a new Mercedes and a swimming pool to choose this.

Seems pretty silly to name the new Arduino as an "Uno" when it uses a completely different type of chip (ARM Cortex rather than AVR) to the classic Uno.
Not really, this is their new mainline board, it should have mainline branding. If this board ends up being cheap enough, they would be able to move everyone from AVR. That has to be their plan.
Hahaha, cheap Arduino...
I really thought the RP2040 will send these guys tails between their legs scrambling for better decisions.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11725
  • Country: us
    • Personal site
Re: Approach to a new uC (or anything else really)
« Reply #11 on: April 22, 2023, 09:52:18 pm »
they don't want my business
And they don't. And this is a huge benefit for Arduino. They get an MCU that is otherwise unknown, so it becomes the new Arduino MCU. It has no association with other boards, there is noting to compare against. Arduino board will be the reference, and the clones will arrive, but they will always be clones.

And there is no chance that they made this decision without Renesas input and support, so may be they want to get into the hobby market more. And we'll have to see if existing corporate culture will squash that marketing move.

And there seems to be so little interest to get ahead of Arduino and do something with this MCU before the board is released, that Mouser still has the same 18 parts in stock. It has not moved a bit in weeks.
« Last Edit: April 22, 2023, 09:55:09 pm by ataradov »
Alex
 

Offline dobsonr741

  • Frequent Contributor
  • **
  • Posts: 696
  • Country: us
Re: Approach to a new uC (or anything else really)
« Reply #12 on: April 23, 2023, 03:42:30 pm »
Quote
Wow they went with Renesas? Thats a weird choice IMHO
b/c of 5V. Insanity.
 

Offline dietert1

  • Super Contributor
  • ***
  • Posts: 2375
  • Country: br
    • CADT Homepage
Re: Approach to a new uC (or anything else really)
« Reply #13 on: April 23, 2023, 04:26:03 pm »
"Learning by doing". Getting information as it is needed, using the web. I prefer reading application notes as they are bit more specific than reference manuals or books. Sometimes i use youtube to get an introduction. People who show how they do it.
Use hardware abstraction were possible in order to prepare porting applications to other hardware. So you don't have to start from scratch. It's part of the embedded development job to prepare for this kind of transition - before it actually happens.

Regards, Dieter
 
The following users thanked this post: RJSV, ppTRN


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf