Approach to a new uC (or anything else really) - Page 1
Forum section: electronics / beginners

author: ppTRN
author_rank: Regular Contributor
timestamp: April 17, 2023, 02:44:53 pm
content: 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?

author: n4u
author_rank: Contributor
timestamp: April 17, 2023, 02:55:43 pm
content: 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

author: ataradov
author_rank: Super Contributor
timestamp: April 17, 2023, 08:47:50 pm
content: 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.

author: barshatriplee
author_rank: Regular Contributor
timestamp: April 18, 2023, 01:19:11 am
content: 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.

author: ppTRN
author_rank: Regular Contributor
timestamp: April 18, 2023, 07:15:41 am
content: Quote from: ataradov on April 17, 2023, 08:47:50 pmThis 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

author: Infraviolet
author_rank: Super Contributor
timestamp: April 18, 2023, 09:45:19 pm
content: 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.

author: ataradov
author_rank: Super Contributor
timestamp: April 18, 2023, 10:13:17 pm
content: Quote from: Infraviolet on April 18, 2023, 09:45:19 pmNot 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.

author: dobsonr741
author_rank: Frequent Contributor
timestamp: April 19, 2023, 02:01:37 am
content: 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.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 21, 2023, 01:44:55 am
content: 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.

author: RJSV
author_rank: Super Contributor
timestamp: April 22, 2023, 09:05:35 pm
content: (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.

author: tszaboo
author_rank: Super Contributor
timestamp: April 22, 2023, 09:39:16 pm
content: 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.Quote from: ataradov on April 18, 2023, 10:13:17 pmHahaha, cheap Arduino...I really thought the RP2040 will send these guys tails between their legs scrambling for better decisions.

author: ataradov
author_rank: Super Contributor
timestamp: April 22, 2023, 09:52:18 pm
content: Quote from: tszaboo on April 22, 2023, 09:39:16 pmAnd 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.

author: dobsonr741
author_rank: Frequent Contributor
timestamp: April 23, 2023, 03:42:30 pm
content: Quoteb/c of 5V. Insanity.

author: dietert1
author_rank: Super Contributor
timestamp: April 23, 2023, 04:26:03 pm
content: "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