News for hackers. Stuff that matters.
Re:ACE: Apple Type-C Port Controller Secrets by bb123 on Wednesday December 30, 2020 @05:22AM (#25580422)
This fascinates me. Is there a website anywhere that is collecting these sorts of use cases? It seems truly mind blowing something as simple as an electric toothbrush would have a processor in it.
Re:ACE: Apple Type-C Port Controller Secrets by lmilcin on Wednesday December 30, 2020 @05:28AM (#25580464)
Nothing mind blowing. Processor is cheaper than building analog circuitry.

Think about your toothbrush. All important timing parameters are configured digitally and you can easily change it. You can technically do the same with resonators but it would take much more board space, be less precise, require inductors which you want to avoid in the circuit, etc.

Re:ACE: Apple Type-C Port Controller Secrets by detaro on Wednesday December 30, 2020 @05:47AM (#25580585)
And cheaper/more flexible than custom digital circuitry too. Even if something is large-scale enough to justify a custom chip, that'll often be some components around a mask-programmed 8051 clone. straight-forward, well-understood, relatively easy to make variations by just changing the program.
Re:ACE: Apple Type-C Port Controller Secrets by amelius on Wednesday December 30, 2020 @05:32AM (#25580491)
You still need to provide the cpu with a clock signal though.
Re:ACE: Apple Type-C Port Controller Secrets by lmilcin on Wednesday December 30, 2020 @05:42AM (#25580552)
No, not really. The STM32s I use (I mainly work with Cortex-M4) have internal resonators that are enough for just about anything unless you need precise timing. Certainly good enough for toothbrush.
Re:ACE: Apple Type-C Port Controller Secrets by amelius on Wednesday December 30, 2020 @07:14AM (#25581011)
How would you explain this part of your argument then:

> You can technically do the same with resonators but it would take much more board space, be less precise, require inductors which you want to avoid in the circuit, etc.

Re:ACE: Apple Type-C Port Controller Secrets by michaelt on Wednesday December 30, 2020 @07:36AM (#25581135)
Many microcontrollers (PIC, STM32, atmega8 etc) include an internal RC oscillator - which is literally inside the chip itself. Zero external components required.

Not only do you save the costs of using a crystal, you also save two pins - which was useful in the days of 8-pin microcontrollers like the ATtiny85.

As internal RC oscillator drift rates can be as much as 10% (and vary with temperature) they're not precise enough to run a serial connection, let alone a USB connection. That's why products like Arduino tend to go directly to using a proper crystal (which gives you a 0.01% drift rate for a few pennies).

Re:ACE: Apple Type-C Port Controller Secrets by xxpor on Wednesday December 30, 2020 @02:08PM (#25584855)
I know next to nothing about microcontrollers, so this might be a dumb question, but how do they do the initial flashing is they can't run a serial port? Are they hooked up to something external before going on the final PCB? Do they not need a precise clock to read the onboard program from whatever's storing it?
Re:ACE: Apple Type-C Port Controller Secrets by michaelt on Wednesday December 30, 2020 @02:50PM (#25585266)
Even if you've got a really inaccurate clock, you can still accept synchronous protocols like SPI and I2C where the bus master provides a clock signal.

Every chip brand would have their own protocol and provide their own programming hardware that could speak it.

Re:ACE: Apple Type-C Port Controller Secrets by rcxdude on Wednesday December 30, 2020 @06:32AM (#25580813)
yeah, almost all microprocessors in that price/power bracket have on-board oscillators, because it saves power, money, and space if you don't need a precise reference.
Re:ACE: Apple Type-C Port Controller Secrets by willis936 on Wednesday December 30, 2020 @05:43AM (#25580561)
The parallax propeller has an on-chip RC oscillator. For obvious reasons it can only be used in low clocked scenarios, but many simple human interface applications are fine with this. The propeller is not a very common MCU, but it is fun to work with and has many technical merits.
Re:ACE: Apple Type-C Port Controller Secrets by s_gourichon on Wednesday December 30, 2020 @10:03AM (#25582245)
> important timing parameter

You can also, well, use a regular toothbrush. What is actually important in a toothbrush has nothing to do with electronics.

Re:ACE: Apple Type-C Port Controller Secrets by lmilcin on Wednesday December 30, 2020 @10:11AM (#25582299)
Actually I switched to electronic toothbrush years ago as it cleans better. Now when I am deprived of my brush and have to rely on a normal brush I don't feel like I did good job cleaning my teeth. Part of this may be subjective feeling but various tests show that electronic toothbrush cleans better than regular one in most cases.

No, I don't need any special functionality other than to clean my teeth but if you were to design a toothbrush you would most likely be asked to implement those.

Re:ACE: Apple Type-C Port Controller Secrets by xxs on Wednesday December 30, 2020 @07:58AM (#25581261)
>Is there a website anywhere...

I doubt, pretty much anything that has electronic circuitry has got a micro processor - it's an off the shelf component, well understood, much easier to change/modify and test than custom built analog circuitry. For example - what's the option to save any end user settings with analog devises - knobs/potentiometers.... Compared non-volatile memory like NAND, the cost (and space and weight) differences are orders of magnitude.