Microchip RISC question

dannyf

Joined Sep 13, 2015
2,197
If it's about C vs assembler or another language, it's apples & oranges & depends what you want to do.
It is really a trade off between software / human costs vs hardware costs. Developing in assembly and maintaining / supporting that assembly code is costly, but it allows you to minimize the hardware costs.

So if you are making a living in a high value add segment of the market, you go for the efficiency and time-to-market advantage of developing in C. If you happen to live in a place where programmers cost a penny a dozen and you are scraping on the hardware to make ends meet, developing in assembly is your key to success.
 

takao21203

Joined Apr 28, 2012
3,702
There are plenty of good resources on this subject. I don't think this is really the issue. In a Harvard architecture you can't reduce the amount of code space consumed by moving data from one type of memory to another.
Yes you can. Change your program so it uses ROM data a lot. Dont compute it with complicate constructs.
Then move it off into EEPROM. Why division when you only divide a handful of values by a few divisors? Precompute all and move it outside.

Think itoa or atoi

You can simply use a 256 bytes table, save quite a few lines of code.

If you try a lot for sure after 2 weeks you can choose a cheaper controller + EEPROM and it will cost a few cents less.
On the other hand, choose a modern MCU and just provide more features.
The plastic mould costs a lot. The product wrapping, marketing, distribution, retail markup...

It doesnt really make any difference.

Its more important you finish it quickly, and keep it simple as much as possible.

You should rather understand modern MCUs and their integrated pheriperals.

How many kb for some foreign font? SD card filesystem.
CRC calculations. Touch buttons, switching supply safety, and so on.

Do all this right, you get a nice product, dont care assembler at all.

Do SD card filesystem in assembler, sure, talk again next year.
 

NorthGuy

Joined Jun 28, 2014
611
It is really a trade off between software / human costs vs hardware costs. Developing in assembly and maintaining / supporting that assembly code is costly, but it allows you to minimize the hardware costs.
Not really.

You spend time doing a good design. This minimizes your hardware costs.

Then you select a language (or a set of languages) which is the most suitable for the design. This minimizes your human costs.
 
Top