Author Topic: Worst "in production" microcontrollers  (Read 22373 times)

0 Members and 1 Guest are viewing this topic.

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21698
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Worst "in production" microcontrollers
« Reply #25 on: August 01, 2022, 05:52:25 am »
Try ATSAM
almost all new device datasheet and erratas are written in the ATSAM layout

Ah, is that where that came from, then?

Don't think I've looked at ATSAMs before MCP so I also have no opinion on those, alas.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 4957
  • Country: si
Re: Worst "in production" microcontrollers
« Reply #26 on: August 01, 2022, 06:35:55 am »
PICs are not that bad to use in practice.

The documentation for PICs is pretty good and the peripherals are nice and simple without much unnecessary baggage. Bugs happen here of there but typically have some workaround. The docs and peripherals on STM32 chips tend to be a lot worse in some places (Like even I2C just locks up and needs turning it off and on again)

The actual CPU inside the 8bit PICs is indeed an atrocious architecture. Getting anything done needs a lot of instructions, it has was too few registers, weird hardware stack etc.. The core parts of the architecture date back to the 1970s and because it had to be cheap it meant it had to use the bare minimum number of transistors. This is why the core is so crappy, it has the bare minimum to run a useful program. This design was then slightly updated and dragged on into the modern times. Microchip probably likes it because it still uses a tiny number of transistors. The C compilers for it have also gotten pretty good so it hides it away from you while also making reasonably optimized machine code, making programing for it not that bad at all. They are cheap and do the job for when you don't need performance.

Back when i was using mostly PICs i tended to rather use the 16bit ones (PIC24F, PIC33F, dsPIC etc..) since those have a more modern core design that is better suited for running C code and can address memory more sensibly.

If you need a brand name cheap 8bit MCU it is probably more sensible to go with AVR. They are cheap lil simple low power MCUs but have a better CPU architecture.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21698
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Worst "in production" microcontrollers
« Reply #27 on: August 01, 2022, 06:50:59 am »
The irony of transistors is, they're essentially zero-cost now.  In fact the AVR-Dx series, I'm pretty sure, is using a new fine-pitch process.  There's very little hint about it, but enough to be sure:

Quote
12.3.2 Voltage Regulator Configuration
A voltage regulator is used to regulate the core voltage. The regulator can be configured to balance power consumption, wake-up time from sleep, and maximum clock speed.

It doesn't make it out to a pin (apparently they solved compensation/bypassing well enough to not even need an external cap!), you'd never know it's there except for hints like this.  Presumably then, they're running at, well, something less -- 1.2, 1.8V, something like that, and all the other peripherals are crammed in there along with the core.  Then level shifters and IO cells complete the chip.  (There's even a few with separate IOVCC domain(s).)  Hence why they can offer even more stuff than the XMEGAs contain.

Possibly they're doing the same with newer PICs, which also come with increasingly ornate and numerous peripherals (I think a lot of the -Dx peripherals are inherited from existing MCP stuff??).  The PIC core itself must be nearly unidentifiable among the sea of buses and gates and arrays. :-DD

Those familiar with PIC datasheets: is there any such mention of stuff like this?  In any family?  Or, also I'd imagine PIC24 or 32 or ds might, or have for a while already, I don't know?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4040
  • Country: nz
Re: Worst "in production" microcontrollers
« Reply #28 on: August 01, 2022, 07:45:17 am »
bruce, you should try some parts from this century

If you can take a PIC18 from 2000 then am I allowed an updated 6502 from 1983? All the registers are expanded to 16 bits, and the address space to 24.

I bet there are a LOT of PIC16 still in use. Digikey etc certainly list a lot of them as active, and with sizes up to 4 KB RAM and 32k instructions.

PIC18 only goes up to twice that size.

The title of the thread is worst microcontroller still in production, and the PIC16 seems to be very much in production. Digikey finds twice as many active PIC16 part numbers as PIC18.

Digikey shows 480 active PIC12 part numbers, and lots and lots of them are in stock. Yes, with a 2-level call stack, and maximum 256 bytes of RAM.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Worst "in production" microcontrollers
« Reply #29 on: August 01, 2022, 08:05:41 am »
Quote
Current [PIC] parts have a 31-255 level stack
The max stack depth on PIC16F1xxx chips is 16.
max stack deptth on PIC16Fxxx is only 8.
(most are better than 2, though.  I count only 6 PIC16F chips with a stack-size of 2.  (grepping through the PACKS directory of MPLAB))

Most PIC18 chips seem to have a stack depth of 31 (?!), Except for a few J, K, and Q series chips with 80 or 127.

PIC24, PIC30, PIC33, PIC32 are all swell, but are whole different architectures, and not what people usually mean when they say "PIC Microcontroller."

 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1641
  • Country: nl
Re: Worst "in production" microcontrollers
« Reply #30 on: August 01, 2022, 08:11:49 am »
This design was then slightly updated and dragged on into the modern times. Microchip probably likes it because it still uses a tiny number of transistors. The C compilers for it have also gotten pretty good so it hides it away from you while also making reasonably optimized machine code, making programing for it not that bad at all. They are cheap and do the job for when you don't need performance.

I don't think it's always the case the Microchip likes it, but they sure like paying customers that buy millions of chips. If those have 30 years of legacy code written in Assembler for the PIC16 core, then they have a financial incentive to keep making those chips.
Obviously that also means newer chips with an extra SPI bus, higher resolution ADC and a bit more memory. But it still drags forward a lot of the old legacy, which is what it is.

Indeed there are also plenty of users that don't really care about performance. That's also fair. It's easy to overengineer everything when latency or throughput isn't even on the requirements list. As long as it's good enough and bug free, then that's job done.
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 4957
  • Country: si
Re: Worst "in production" microcontrollers
« Reply #31 on: August 01, 2022, 09:43:49 am »
Some of the 16bit PICs do have internal Vcore regulators since they do need an external capacitor for it. The faster variants of the 16bit PICs did become pretty power hungry (in the 100s of mW) and so this was likely a way to help cut down the power consumption.

The 16bit PICs ware an awkward middleground in general. They didn't have the performance of the bigger 32bit chips and they didn't have the low power capability of the 8bit chips. Since the 8bit PICs ware so low transistor count they could stick to very old chip fab nodes and they still ran well enough, but it made for terrible MIPS per Watt in the 16bit ones.

I don't think it's always the case the Microchip likes it, but they sure like paying customers that buy millions of chips. If those have 30 years of legacy code written in Assembler for the PIC16 core, then they have a financial incentive to keep making those chips.
Obviously that also means newer chips with an extra SPI bus, higher resolution ADC and a bit more memory. But it still drags forward a lot of the old legacy, which is what it is.

Indeed there are also plenty of users that don't really care about performance. That's also fair. It's easy to overengineer everything when latency or throughput isn't even on the requirements list. As long as it's good enough and bug free, then that's job done.

If its about legacy code they probably wouldn't have to design new PICs, they could just keep making the old ones.

It is more that the PIC is one of the cheapest 8bit MCUs you can buy from the big distributors(Digikey Mouser Farnell..) that comes from a well known brand name and has a large user base of people who used them in the past. They keep designing PICs into products just because they know how to use them.

But hey so do i. Every so often i still use a PIC when a really simple task for a MCU pops up. Sure a PIC12F barely has any brains in it, but it is enough to implement a timer or counter or PWM controller something.



If you want to really scrape the bottom of the barrel there is the Motorola MC14500B (1 bit microprocessor):
https://en.wikipedia.org/wiki/Motorola_MC14500B
It is hard to find where to buy one, but you can still find brand new chips if you look long enough.

 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2300
  • Country: gb
Re: Worst "in production" microcontrollers
« Reply #32 on: August 01, 2022, 02:57:42 pm »
PIC16F are probably the least good most popular mcu core around ATM.
Please stop buying them to make them go away.
Oh, crap, I just designed one in.

As for the worst in production...hmm, maybe a 4-bit mcu with integrated 4-bit ADC?
Or maybe it's the best device for it's target application and bom cost?
 

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 334
  • Country: gb
    • Woofys Place
Re: Worst "in production" microcontrollers
« Reply #33 on: August 01, 2022, 03:41:49 pm »
Any micro-controller in which specified features do not work and never get fixed. (Looking at you, PIC32 EC).
I'd certainly not include anything just because I didn't like the architecture.

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: Worst "in production" microcontrollers
« Reply #34 on: August 01, 2022, 03:56:19 pm »
PIC16F are probably the least good most popular mcu core around ATM.
Please stop buying them to make them go away.
Oh, crap, I just designed one in.

As for the worst in production...hmm, maybe a 4-bit mcu with integrated 4-bit ADC?
Or maybe it's the best device for it's target application and bom cost?
Nobody cares what the core is. it's all about the peripherals ( and nowadays, availability).


Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: Worst "in production" microcontrollers
« Reply #35 on: August 01, 2022, 03:59:19 pm »
I'd certainly not include anything just because I didn't like the architecture.
Let's be honest: MCU's are incredibly complex devices. Not the highest transistor count perhaps, but billion+ CPU's have a lot of repetitive parts (example: on-die caches) and charge a lot more money. MCU's are inexpensive and have a wide variety of different peripherals, so architecturally they would have more opportunities for flaws.

It's been a long time since I used something as complex as an MCU that had a blank errata sheet. The trick is to not cavalierly dismiss a part (or family) simply because it's not perfect, or its architecture isn't your favorite, etc. Picking the right MCU for the job is one of the more complex, and probably THE most significant, aspect of any embedded design. You have to consider the peripherals you need and whether they'll be on-die or external, cost, packages, availability, architecture (which is often driven by language choice), staff familiarity (impacts development time/cost), whether you have to buy new hardware/software tools to use it (and the associated learning curves), etc.

And that's just a partial list. The internal architecture is important, yes, but seldom a true deal-killer. It's just one of many factors to consider.

 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: Worst "in production" microcontrollers
« Reply #36 on: August 01, 2022, 04:39:33 pm »
It's been a long time since I used something as complex as an MCU that had a blank errata sheet. The trick is to not cavalierly dismiss a part (or family) simply because it's not perfect, or its architecture isn't your favorite, etc.
A big danger with errata  is using a part you've used before as it's familiar, but not re-reading the errata to see if it affects the new project
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: Worst "in production" microcontrollers
« Reply #37 on: August 01, 2022, 05:15:17 pm »
A big danger with errata  is using a part you've used before as it's familiar, but not re-reading the errata to see if it affects the new project
Agreed. But that's just part of the evaluation process. Does it have the peripherals needed for this project? Any bugs in the errata that affect this project? And so forth. That's why I said the choice of MCU may be the most significant aspect of an embedded project.
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2300
  • Country: gb
Re: Worst "in production" microcontrollers
« Reply #38 on: August 01, 2022, 05:35:03 pm »
PIC16F are probably the least good most popular mcu core around ATM.
Please stop buying them to make them go away.
Oh, crap, I just designed one in.

As for the worst in production...hmm, maybe a 4-bit mcu with integrated 4-bit ADC?
Or maybe it's the best device for it's target application and bom cost?
Nobody cares what the core is. it's all about the peripherals ( and nowadays, availability).

Nobody?
Oh, you mean the folks who don't give a damn about performance, stack depth, linear RAM, interrupt priorities, shadow registers, tail chaining etc, etc. Got it.

It's all about the peripherals only when the core is a good modern one.
« Last Edit: August 01, 2022, 06:09:50 pm by voltsandjolts »
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: Worst "in production" microcontrollers
« Reply #39 on: August 01, 2022, 06:58:22 pm »
PIC16F are probably the least good most popular mcu core around ATM.
Please stop buying them to make them go away.
Oh, crap, I just designed one in.

As for the worst in production...hmm, maybe a 4-bit mcu with integrated 4-bit ADC?
Or maybe it's the best device for it's target application and bom cost?
Nobody cares what the core is. it's all about the peripherals ( and nowadays, availability).

Nobody?
Oh, you mean the folks who don't give a damn about performance, stack depth, linear RAM, interrupt priorities, shadow registers, tail chaining etc, etc. Got it.
OK almost nobody
Quote
It's all about the peripherals only when the core is a good modern one.

...only when the core is "good enough" for a particular application, regardless of age.

 The success of Microchip, and even  the 8051 would suggest that these are good enough for a very large range of applications.

I'd contend that within a given class of MCUs ( width, clock speeds) , there is very rarely enough differentiation in the core alone to matter to the majority of people compared to peripherals, power and other non-core parameters.
« Last Edit: August 01, 2022, 07:09:59 pm by mikeselectricstuff »
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 16626
  • Country: us
  • DavidH
Re: Worst "in production" microcontrollers
« Reply #40 on: August 01, 2022, 09:16:14 pm »
It is more that the PIC is one of the cheapest 8bit MCUs you can buy from the big distributors(Digikey Mouser Farnell..) that comes from a well known brand name and has a large user base of people who used them in the past. They keep designing PICs into products just because they know how to use them.

PIC was also one of the first, if not the first, reprogrammable microcontrollers in a plastic package making it incredibly easy to use and inexpensive, starting with the 16C84.  Before this developers had to use UV erasable chips in ceramic packages.  And the development tools were cheap as well.  The 68HC811 might have been second, but being from Motorola had horrible availability, and development costs were much higher.
 
The following users thanked this post: jpanhalt, SiliconWizard

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13748
  • Country: gb
    • Mike's Electric Stuff
Re: Worst "in production" microcontrollers
« Reply #41 on: August 01, 2022, 09:28:50 pm »
It is more that the PIC is one of the cheapest 8bit MCUs you can buy from the big distributors(Digikey Mouser Farnell..) that comes from a well known brand name and has a large user base of people who used them in the past. They keep designing PICs into products just because they know how to use them.

PIC was also one of the first, if not the first, reprogrammable microcontrollers in a plastic package making it incredibly easy to use and inexpensive, starting with the 16C84.  Before this developers had to use UV erasable chips in ceramic packages.  And the development tools were cheap as well.  The 68HC811 might have been second, but being from Motorola had horrible availability, and development costs were much higher.
There were a few others, like the Philips 87C751(?) which was 28-pin single-chip OTP device that wasn't very expensive, and a few other OTP 8051 variants, but the PIC16C54 etc. were undoubtedly the first devices to target OTP for production in place of mask rom.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26907
  • Country: nl
    • NCT Developments
Re: Worst "in production" microcontrollers
« Reply #42 on: August 01, 2022, 09:50:23 pm »
The success of Microchip, and even  the 8051 would suggest that these are good enough for a very large range of applications.
In the 80's yes. You have to factor in that microcontroller firmware (and software) has become a lot more complex with all kinds of communication protocols. 8015 and the lower end PICs are great to program in assembly but horrible to compile C for (let alone C++). On these kind of CPUs you can only use a subset of the C language as these cores do not support use of pointers properly. This makes porting code between platforms very complicated because code tailored for PIC or 8051 will work sub-optimal on other platforms and vice-versa. Technology has advanced and the CPU cores used in the 8051 and lower end PICs are horribly outdated nowadays.
« Last Edit: August 01, 2022, 09:53:06 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4040
  • Country: nz
Re: Worst "in production" microcontrollers
« Reply #43 on: August 02, 2022, 01:48:06 am »
8015 and the lower end PICs are great to program in assembly but horrible to compile C for (let alone C++). On these kind of CPUs you can only use a subset of the C language as these cores do not support use of pointers properly.

They both have some kind of indirect register thingie (DPTR, FSR/INDF). At least in the models that have at least 256 bytes of RAM rather than 32 or something. Do you need C if there is less than 256 bytes of RAM?

On many CPUs with less than ideal instruction sets some kind of optimum can be found where code that needs to be fast is written in assembly language but 99% of the code is written in some more convenient to use and more compact instruction set (often referred to as "bytecode", though it isn't always) that is then interpreted.

The interpretation was often about 10 times slower than native instructions (which is a lot better than BASIC or modern Python), but the code could often be 2-10 times smaller than native code, so even after allowing for the size of the interpreter you could quickly be ahead on total code size.

One well known example is Steve Wozniak's SWEET16 for the Apple ][. The interpreter was about 300 bytes of code. It used 16 pairs of zero page locations to provide 16 pseudo 16 bit registers and instructions to do arithmetic on them and use them as pointers etc. Register 0 was used as an accumulator. To do "r3 = r4 + r5" (a 16 bit add) you would code 0x24 0xA5 0x33 (LD r4; ADD r5; ST r3). It would take 13 bytes of native 6502 code to do the same add on the same memory locations.

Are similar things used in PIC or 8051 land?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21698
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Worst "in production" microcontrollers
« Reply #44 on: August 02, 2022, 02:05:36 am »
Quote
It's all about the peripherals only when the core is a good modern one.

...only when the core is "good enough" for a particular application, regardless of age.

 The success of Microchip, and even  the 8051 would suggest that these are good enough for a very large range of applications.

I'd contend that within a given class of MCUs ( width, clock speeds) , there is very rarely enough differentiation in the core alone to matter to the majority of people compared to peripherals, power and other non-core parameters.

For example, I did the HW/SW to a little handheld device recently. A few pushbuttons, LEDs, etc., you can change rate/intensity of the mechanical function among a few presets, and, that's about it.  BMS/charger, and MCU with power-down state.  Pretty much anything would do, but a pure software solution (plus GPIOs say) would need... well, not sure, as far as bit-banging the LEDs, which I did as a dimmable matrix.  Maybe some 10s of MIPS if pure CPU.  Needless to say, just one timer helps out greatly with that.  I also used ADC to compensate for Vbatt, and another timer to PWM the mechanicals.

Almost anything has that set of features available, so, aside from size, probably most 80s MCUs even could've done that.  I went with AVR, because of course, and ran at all of 4MHz.  Plenty of CPU cycles to spare (plain C, no particular effort spent on optimization).  Any dank old PIC or 8051 can do that.  Well, I did need a couple multiplies (compensate for Vbatt), which maybe an 8051 wouldn't be able to do fast enough to reduce flicker. But one with hardware multiply would likely be fine.

Whereas, sometimes you have piddly little applications like this, but they need communications instead: I2C, SPI, USART, CAN, IrDA...  Some to talk with external peripherals, some for direct communication, some just to generate relevant waveforms (like using SPI to generate WS2812 pulses, or IrDA, SPI, USART or others for generating remote control signals, radio comms / modem stuff, etc.).  Or maybe you don't even need a timer (or many), or ADC, etc., but you're using up every single one of the six USARTs provided...

Another recentish project used AVR-DA's TCD as very much a core element; this could probably be handled by a bit of external logic with more traditional / basic timers, but having all the features integrated not only reduces external hardware but reduces CPU responsibility as well (the fault disable mechanism, routed via event system, means the CPU can do just whatever in the mean time).  Or, put still another way: it reduces a traditional DAQ-hardware system, say CPU+ADC+DAC - TL494, to just MCU.  If a minimal chip solution is required, it simply wouldn't be possible without a timer like this, and/or a regular timer with EVSYS and CCL.

So there's very much value in spamming every possible peripheral that can fit, and letting them do as much work as possible.  The CPU needn't be all that important, sometimes it is; or sometimes you can get by with fewer/simpler peripherals thanks to extra CPU power, etc.  Although, as CPUs get more complex, so too the peripherals, after all why shouldn't they? :)

Another perspective: look at what's been done on any classic PC or game console.  Partly by absolutely heroic ASM coding, but also by eking every last clock cycle of value out of the available peripherals.  Raster graphics devices, you see raster bars and other scanline tricks a lot; there's a bias for horizontal banding and movement.  But you'll never* see full-screen rotation and scaling on a Sega Genesis, that feature is unique to the contemporary SNES hardware.

*There are hacks, like moving around tiles/sprites in software.  The blocks themselves don't rotate, but their arrangement does.  Which looks alright -- correct, even, at small angles.  And, sprites up to a modest size can be blitted directly by the CPU -- thanks to the powerful 68k, something the SNES' pitifully slow 65C816 can't hope to do -- but not enough, I think, to cover the full screen, or while doing more than basic animation on other layers.

Or the modern C64/Amiga/etc. scene, people crafting accelerator cards for them for example.  Basically plug in an SBC and use the base machine as a graphics terminal.  Or, the main CPU is still in control as such, but the amount of power at its proverbial fingertips is as a magic oracle, able to compute whole megabytes in the blink of a scan line.  For such an interface, you need to somehow enumerate exactly what operations can be performed (or somehow program them i.e. drop in "microcode" for the accelerator to run), but the number of operations can be extremely large, even for very modest APIs (e.g. 65k different operations from a 16-bit index); and if one does what you're looking for, or the composition of a few operations will get you there -- why not, right?

Or for a more realistic example: your boss doesn't need to be smart, as in, able to do every job under them; they just need to be responsible, and understand what those jobs do, how they go together, etc.  (Much as we would like them to know better... the fact remains, there are more than enough successful (read: not constantly going bankrupt) companies which fit this pattern, for better or worse.)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Worst "in production" microcontrollers
« Reply #45 on: August 02, 2022, 05:17:26 am »
PIC was also one of the first, if not the first, reprogrammable microcontrollers in a plastic package making it incredibly easy to use and inexpensive, starting with the 16C84.  Before this developers had to use UV erasable chips in ceramic packages.  And the development tools were cheap as well.  The 68HC811 might have been second, but being from Motorola had horrible availability, and development costs were much higher.

Motorola 68HC805 was first according to this (see picture)

There were a few others, like the Philips 87C751(?) which was 28-pin single-chip OTP device that wasn't very expensive, and a few other OTP 8051 variants, but the PIC16C54 etc. were undoubtedly the first devices to target OTP for production in place of mask rom.

That (OTP)  does not count as REprogrammable in my book.
Those OTPs were made from the 70s since it were the same dies but in a closed plastick or ceramic package as the UV erasable ones that had a ceramic package with the glass window. The first controllers were all ceramic with glass window and the otp ones had a gold cap soldered over them.
Also there were specials the prototyping versions of new microcontrollers. They had a ceramic package and pins on top where the seperate eprom could be inserted.
The first microcontrollers used all the die for their core, the rom section did not fit so they already had two dies in a package back then.

« Last Edit: August 02, 2022, 05:27:08 am by Kjelt »
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 4957
  • Country: si
Re: Worst "in production" microcontrollers
« Reply #46 on: August 02, 2022, 05:37:32 am »
8015 and the lower end PICs are great to program in assembly but horrible to compile C for (let alone C++). On these kind of CPUs you can only use a subset of the C language as these cores do not support use of pointers properly.

Are similar things used in PIC or 8051 land?

Unfortunately yes. The PicAxe or BasicStamp on the PIC. Haven't used those, but i think they ware both dog slow, especially since the Stamp executed the program from external serial memory. Tho it was packaged more as a product in the form of a already programmed OTP PIC chip that included the UART bootloader and everything. They ware essentially the 'Arduinos' of the early days as it was mostly used by hobbyists because of being easier to use.

As for C compiler support for the PICs. Id say it is more than good enough. The compilers from the early days indeed rather poor. These days they run on the HiTech C compiler . They got bought by Microchip to become  the xc8 compiler and replace there own in house compiler (that was worse), making it the new official vendor compiler. That compiler was designed from the ground up to run on tiny crappy hardware and does a pretty good job at it. It makes compact fast code and supports things like pointers just fine (within reason ofcouse). One still has to be careful when doing fancy math since it loves to cast things to 8 bit whenever it gets the chance (since PIC16/PIC12 suck at math). Sure it won't be like using C on a modern ARM chip, the compiler is not magic, but it gets impressively close given the crappy architecture it has to run on. I have crammed things like PID regulators(including UI) inside about a kilobyte of program memory using C on a PIC.

As for C++...No....Just no. Wrong tool. period.
The chip was not even designed to run C and is bad at pointers. You also are not going to develop applications big and complex enough to actually benefit from the C++ syntax sugar, hierarchy, modularity...etc. You only have a few kilobytes of program memory to work with anyway. If you are making an application that complex then why are you even looking at a 8bit PIC. Go get a cheep low end ARM chip instead, costs just slightly more and it eats C code for lunch.
 

Offline Colt45

  • Contributor
  • Posts: 29
  • Country: ca
Re: Worst "in production" microcontrollers
« Reply #47 on: August 02, 2022, 06:30:37 am »
That (OTP)  does not count as REprogrammable in my book.
Those OTPs were made from the 70s since it were the same dies but in a closed plastick or ceramic package as the UV erasable ones that had a ceramic package with the glass window.

Old school EPROM is reprogrammable whether you count it or not!
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Worst "in production" microcontrollers
« Reply #48 on: August 02, 2022, 06:57:03 am »
That (OTP)  does not count as REprogrammable in my book.
Those OTPs were made from the 70s since it were the same dies but in a closed plastick or ceramic package as the UV erasable ones that had a ceramic package with the glass window.

Old school EPROM is reprogrammable whether you count it or not!
OTP = One Time Programmable != Reprogrammable.
So the eprom is inside a plastick/ceramic sealed package, good luck reprogramming that one without milling off the top or desoldering the cap.

That being said, it was obvious by naming the Microchip PIC16C84 that the point was that it was one of the first chips where you did not have to remove EPROM chips, erase them, program them , reinsert them, to do the reprogramming.
That was the turning point for the firmware developers. Before that you had to buy a very expensive large box , usually called ICE (In Circuit Emulator) that had RAM chips instead of ROM and you could debug and program on the fly with it. Those boxes where build by specialized firms like Lauterbach and the likes, needed a PC as host and costings thousands of dollars.
That this was no longer needed by using eeprom and later flash inside the microcontroller combined with JTAG debugging etc. , that was the great breakthrough for developers.
« Last Edit: August 02, 2022, 07:03:22 am by Kjelt »
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16867
  • Country: lv
Re: Worst "in production" microcontrollers
« Reply #49 on: August 02, 2022, 07:09:24 am »
OTP can only be erased with X-ray of carefully selected strength (to erase but not fry) and applied for quite some time.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf