Author Topic: 8-bit uC - is there even a point?  (Read 57273 times)

0 Members and 1 Guest are viewing this topic.

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: 8-bit uC - is there even a point?
« Reply #175 on: October 01, 2018, 03:04:25 am »
Code: [Select]
if ((PORTB & SWITCHMASK) == MY_SWITCH_COMBO ...
It's sort of like "ARM does everything faster and better except for dealing with peripheral registers", overlooking the factor that a lot of embedded code does very little BUT "deal with peripheral registers.  :-(

"A lot of code" does not equate a lot of execution time spent ;-)

In a 300K+ firmware that I am helping a client on, the peripheral register accessing code amounts to... not a whole lot. Less than 5% for sure.
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline rjp

  • Regular Contributor
  • *
  • Posts: 124
  • Country: au
Re: 8-bit uC - is there even a point?
« Reply #176 on: October 01, 2018, 03:08:06 am »
some folks do runs of thousands  of products with bare minimum mcu's and lots of   assembler to maximize performance and minimize cost

other folks do bespoke and small production runs with fat HAL's and chip price means nothing, but developer time is expensive, so get the big one with most libraries and avoid stuffing around.

its always fun to watch those 2 groups shout at each other :)
 
The following users thanked this post: ogden

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6459
  • Country: nl
Re: 8-bit uC - is there even a point?
« Reply #177 on: October 01, 2018, 07:04:13 am »
concerning ISR delays, for "real time" applications the most important factor is consistency/predictability.
In the end it does not matter if there is an ISR delay of 1us or 3us as long as you can get the job done within the time, you can use RMA if your controller can handle the task. If not you need a faster or different controller, that is all there is to it.
The biggest problem for real time is an unpredictable delay for instance with cache miss penalties, there is where you can really get headaches, in my experience that is. That is why I am not very fond of caches in embedded controllers.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8110
  • Country: fi
Re: 8-bit uC - is there even a point?
« Reply #178 on: October 01, 2018, 07:46:13 am »
Quote
1) Caches are a moot point. They tend to be disabled by default. Just don't enable them.
You think so, eh?  I'm talking less about formal "cache memory that you need to enable" and more about things like the "2*64bit prefetch buffer" (stm32f1xx) or the "Enhanced flash memory accelerator" (LPC176x)Your lovely single-cycle 120MHz RISC CPU isn't going to run so well if every instruction takes 5 additional cycles to fetch from the flash program memory (SAMD51.  But 50ns access times for flash seem to be "typical.")

As said earlier, run timing-critical routines from core coupled instruction memory, and put the stack on core coupled data memory.

In a typical mid-scale MCU project, I may have 30-50K of program total, out of which about 2-3K is timing critical, and always fit in ITCM, even on small/cheap devices.

Absolutely smallest and cheapest won't have core-coupled RAMs, of course.

12-cycle interrupt latency including register push, happening at at least 48MHz, possibly even at 400MHz-500MHz on more expensive ARM MCUs, is way faster than a 5-cycle interrupt latency + about 2-4 cycles of software latency for minimum stack push (1-2 registers) in most actual ISRs, run at 20MHz, on AVR.

Both are quick enough for most situations.

Also, interrupt latency needs to be to calculated to the point where the execution has provided you the actual result you need quickly. Sometimes it's the first instruction in ISR (e.g., safety turn-off of a single signal, responding to an analog comparator event), sometimes it may be 10-20 instructions later (e.g., checking for the actual reason of the interrupt, then turning off several signals). Overall quick execution really helps here, as do more flexible GPIOs allowing resetting and setting any arbitrary number of bits on a PORT with a single register access, typical to modern ARM controllers.
« Last Edit: October 01, 2018, 07:49:40 am by Siwastaja »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: 8-bit uC - is there even a point?
« Reply #179 on: October 01, 2018, 08:40:19 am »
http://www.coolermaster.com/peripheral/keyboards/suppressor/
Boasting 72MHz 32 bit MCU and 128kB of flash in keyboard, as if does matter FFS  :palm:.

Complex RGB LED blinking patterns needs lots of fast PWM channels, CPU resources and memory  :-DD Also it seems that 21st century programming and regression testing culture requires firmware update for everything including LED lamps. True story: Logitech managed to release G613 keyboard and MK850 combo with very serious keyboard bug (lost Ctrl+keypress on wake-up). Only firmware update saved them from recall.
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: 8-bit uC - is there even a point?
« Reply #180 on: October 01, 2018, 09:07:05 am »
What's wrong with DIP? Why there's no ARMs in DIP? Damn it.
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: 8-bit uC - is there even a point?
« Reply #181 on: October 01, 2018, 09:10:02 am »
http://www.coolermaster.com/peripheral/keyboards/suppressor/
Boasting 72MHz 32 bit MCU and 128kB of flash in keyboard, as if does matter FFS  :palm:.
Not to mention that having excess resources on the microcontroller means more room for nefarious people to play with. Manipulating the keyboard firmware can be very interesting.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8605
  • Country: gb
Re: 8-bit uC - is there even a point?
« Reply #182 on: October 01, 2018, 09:21:58 am »
What's wrong with DIP? Why there's no ARMs in DIP? Damn it.
There are a few M0 parts with a DIP package option. Not many, but look around and you'll find some aimed at the white good market. Look hard enough and there might be the odd M3 or M4 part, aimed at the motor control market, offered in a DIP package.
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: 8-bit uC - is there even a point?
« Reply #183 on: October 01, 2018, 09:29:57 am »
IIRC, according to Hackaday, that's not the case anymore.

https://hackaday.com/2018/04/15/rip-dip-arm/
« Last Edit: October 01, 2018, 10:15:14 am by GeorgeOfTheJungle »
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline rjp

  • Regular Contributor
  • *
  • Posts: 124
  • Country: au
Re: 8-bit uC - is there even a point?
« Reply #184 on: October 01, 2018, 09:33:54 am »
Cheap gumstick modules with all thr supporting passives appear to be the diy replacement.
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 4983
  • Country: ro
  • .
Re: 8-bit uC - is there even a point?
« Reply #185 on: October 01, 2018, 09:41:43 am »
There's some available in SOIC footprints, which have the pins spaced wide enough (1.27mm, half the regular 0.1" on proto boards) that you can even solder them directly on prototyping boards, or you can use very cheap SOIC to DIP adapter boards. They can be easily soldered by hand.

See for example SAM D10 series from Microchip ( https://www.digikey.com/product-detail/en/microchip-technology/ATSAMD10C13A-SSNT/ATSAMD10C13A-SSNTDKR-ND/5956614 )  or this Cypress stuff: https://www.digikey.com/product-detail/en/cypress-semiconductor-corp/CY8C4014SXI-420T/428-4129-6-ND/7401243
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: 8-bit uC - is there even a point?
« Reply #186 on: October 01, 2018, 09:58:39 am »
Cheap gumstick modules with all thr supporting passives appear to be the diy replacement.

Exactly. Bare DIP chip is not ready to run out of the box, the same apply to LQFP/SOIC ARM soldered on adapter. Apart from dirt-cheap & popular stm32 Blue Pill, there are many other breadboardable ARM boards:

https://os.mbed.com/platforms/?form-factor=6
 

Online wraper

  • Supporter
  • ****
  • Posts: 16796
  • Country: lv
Re: 8-bit uC - is there even a point?
« Reply #187 on: October 01, 2018, 10:11:24 am »
http://www.coolermaster.com/peripheral/keyboards/suppressor/
Boasting 72MHz 32 bit MCU and 128kB of flash in keyboard, as if does matter FFS  :palm:.

Complex RGB LED blinking patterns needs lots of fast PWM channels, CPU resources and memory  :-DD Also it seems that 21st century programming and regression testing culture requires firmware update for everything including LED lamps. True story: Logitech managed to release G613 keyboard and MK850 combo with very serious keyboard bug (lost Ctrl+keypress on wake-up). Only firmware update saved them from recall.
Well, You may need a beefy MCU. However it does not matter if it's 8051 or ARM or clock used as long as such product woks as intended. It's not like it gives more FPS on PC. About G613, I have it, they could not fix it for more than half a year since release. And when they released it, mine died during firmware update  |O. BTW it's not like it lost key press, any first press was registered as press- immediate release, thus key combinations failed.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13695
  • Country: gb
    • Mike's Electric Stuff
Re: 8-bit uC - is there even a point?
« Reply #188 on: October 01, 2018, 10:13:49 am »
Cheap gumstick modules with all thr supporting passives appear to be the diy replacement.

Exactly. Bare DIP chip is not ready to run out of the box, the same apply to LQFP/SOIC ARM soldered on adapter. Apart from dirt-cheap & popular stm32 Blue Pill, there are many other breadboardable ARM boards:

https://os.mbed.com/platforms/?form-factor=6
There are PIC32's in DIP with interla oscilator that just need power and a couple of caps to work.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: GeorgeOfTheJungle

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26755
  • Country: nl
    • NCT Developments
Re: 8-bit uC - is there even a point?
« Reply #189 on: October 01, 2018, 10:32:41 am »
IIRC, according to Hackaday, that's not the case anymore.

https://hackaday.com/2018/04/15/rip-dip-arm/
NXP still makes one with 28 pins!
https://www.nxp.com/part/LPC1114FN28
Actually this is quite a capable microcontroller. I'm using the QFN version in one of the projects I've done recently. And yes, these have an internal oscillator as well so with some bypass caps you are ready to roll.
« Last Edit: October 01, 2018, 10:34:18 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: GeorgeOfTheJungle

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13695
  • Country: gb
    • Mike's Electric Stuff
Re: 8-bit uC - is there even a point?
« Reply #190 on: October 01, 2018, 10:39:43 am »

Complex RGB LED blinking patterns needs lots of fast PWM channels,
No it doesn't - PWM doesn't scale well so you use use binary code modulation instead, all you need is the ability to turn on for a precise time - trivial if using external drivers using a compare peripheral, but also doable entirely in software with a little care
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5315
  • Country: gb
Re: 8-bit uC - is there even a point?
« Reply #191 on: October 01, 2018, 11:06:28 am »
Add also that you may have to save even more on the stack if you use floating point. It gets very painful, very fast, and it’s not unusual to have to start disassembling and massaging the ISR code or modifiers accordingly. One problem with this approach is that your well meaning fiddling makes the code less maintainable when someone comes along withiut knowledge of your assumptions.
Personally I try hard to avoid being dependant on software when it comes down to nanosecond timing on a regular microcontroller because it is hard to achieve and hard to maintain. I guess these situations are likely originating from a hardware designer thinking 'they can fix this in software for sure'.

It’s not necessarily time critical scenarios, latency also has a significant overhead in repeatedly invoked ISRs, such as servicing a USB HS device  for example.
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: 8-bit uC - is there even a point?
« Reply #192 on: October 01, 2018, 11:24:08 am »
NXP still makes one with 28 pins!
https://www.nxp.com/part/LPC1114FN28
Actually this is quite a capable microcontroller. I'm using the QFN version in one of the projects I've done recently. And yes, these have an internal oscillator as well so with some bypass caps you are ready to roll.

0 in stock at Digikey. This is a no-no. And I agree, easy to solder SOIC chips on cheap adapters.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6459
  • Country: nl
Re: 8-bit uC - is there even a point?
« Reply #193 on: October 01, 2018, 11:30:17 am »
Better to design your own small adapter board and add all the local jellybean stuff to get it working properly.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: 8-bit uC - is there even a point?
« Reply #194 on: October 01, 2018, 11:32:32 am »

Complex RGB LED blinking patterns needs lots of fast PWM channels,
No it doesn't

Sure! Didn't I add ROFL smiley at the end of that quite obviously sarcastic sentence?
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: 8-bit uC - is there even a point?
« Reply #195 on: October 01, 2018, 11:49:07 am »
Exactly. Bare DIP chip is not ready to run out of the box, the same apply to LQFP/SOIC ARM soldered on adapter.
There are PIC32's in DIP with interla oscilator that just need power and a couple of caps to work.

Exactly - you still need power (plug + regulator), caps and so on. IMHO AVR is also such kind of animal and most likely there are other such MCU's as well. Anyway this is not as ready to run out of the box as boards in this list I mentioned before.
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: 8-bit uC - is there even a point?
« Reply #196 on: October 01, 2018, 02:48:26 pm »
NXP still makes one with 28 pins!
https://www.nxp.com/part/LPC1114FN28

Thanks nctnico, but what the $&%... can't find/buy it anywhere, must be made of unobtanium! :-)
The further a society drifts from truth, the more it will hate those who speak it.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26755
  • Country: nl
    • NCT Developments
Re: 8-bit uC - is there even a point?
« Reply #197 on: October 01, 2018, 02:55:03 pm »
NXP still makes one with 28 pins!
https://www.nxp.com/part/LPC1114FN28

Thanks nctnico, but what the $&%... can't find/buy it anywhere, must be made of unobtanium! :-)
Newark says they have it available in the near future. Given the component shortages it doesn't surprise me. Try to buy 100nf 0603 capacitors...  :scared:
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4392
  • Country: dk
Re: 8-bit uC - is there even a point?
« Reply #198 on: October 01, 2018, 04:08:18 pm »
NXP still makes one with 28 pins!
https://www.nxp.com/part/LPC1114FN28

Thanks nctnico, but what the $&%... can't find/buy it anywhere, must be made of unobtanium! :-)
Newark says they have it available in the near future. Given the component shortages it doesn't surprise me. Try to buy 100nf 0603 capacitors...  :scared:

digikey has plenty

 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8605
  • Country: gb
Re: 8-bit uC - is there even a point?
« Reply #199 on: October 01, 2018, 04:26:03 pm »
What is the thing with DIP? Are they still being used by any mass produced products?
The only DIP chips I can still think of are DIP4 optocouplers and DIP8 integrated flyback SMPS chips.
For the sake of love, I've not used a DIP for years, literally years, besides student teaching projects.

PS. Also why TSSOP? They are harder to hand solder than DFN/QFN. The gull wing sucks and stores solder, so bridging happens all the time with short pad extension. With QFN, I can do 0.2mm extension per side and they still don't bridge.
If you want to use a single sided SRBP PCB, as many whites goods makers still do, DIPs are the prefered package.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf