EFM8 USB First Impression - Page 1
Forum section: electronics / general

author: blueskull
author_rank: Unknown
timestamp: April 23, 2016, 09:19:09 am
content: I've been lurking around for a solution that serves as a DC UPS controller that handles charging, load switching, monitoring and communication.After experimenting and literature researching on a variety of micro controllers, I eventually chose the EFM8 Universal Bee micro controller.Here is a brief summary of my experience with it, the platform is Universal Bee Starter Kit that Dave featured in his mail bag.My overall experience is positive. It took me ~2 hours to write an USB echo program from scratch using its VCPXpress library with some reference from its VCPXpress demo code.There are some quirks, such as the demo code is not written very well (Rx soft lock if nothing to Tx), and the library triggers a linker warning which can be suppressed.The entire process form learning the IDE, learning API for VCPXpress, reading reference manual and writing a simple new line tokenizer and a command parser as well as all debugging and tweaking took less than 8 hours.For the price less than an USB-UART bridge (~$1.1 each at single quantity), the EFM8 is really a cost effective solution, it also comes with a fairly accurate ADC with 50ppm/C reference, 3 channels of PWM, and tons of other peripherals that I do not need (I2C slave, SMBus master, SPI, UART, comparator, CRC and others).Of course, its processing power is not nearly on par with modern ARM based solution -- it only comes with 16KB of FLASH which 9K of them are occupied by VCPXpress, and 2304 bytes of RAM including xdata section. It can only run up to 25MHz without prefetching, and 48MHz with prefetching, and it is only powered by a wimpy modernized 8051.Attached is a demo code I wrote that controls 3 on-board LEDs from serial command. To run it, you will need Universal Bee Starter Kit and Silabs CP210x VCP driver installed.Send RON, GON or BON to turn on red, green or blue LED, and send ROFF, GOFF or BOFF to turn off the respective LED.Once again, it is really cool to get a simple USB firmware running and actually doing useful things for only 76 effective lines of code.

author: wraper
author_rank: Unknown
timestamp: April 23, 2016, 10:08:40 am
content: I'm now in process of designing a device on efm8ub11f16g. The big deal for me is a built in 3.3V 100mA Vreg which can power external circuity. Good ADC is important as well. Because of this MCU, I can keep the the part count being minimal, and it is very cheap as well. If I wouldn't need so many inputs, I could use efm8ub10f8g instead, which considering it's capabilities costs not much more than dirt.

author: dannyf
author_rank: Super Contributor
timestamp: April 23, 2016, 01:21:47 pm
content: This discussion demonstrates the point I made earlier: cores don't matter. What does matter are the peripherals. You can do a lot of interesting things with a slow and "obsolete" core like 8051, and you may not do much more than blinking an led on a Cortex-M4F if you are incompetent.This ARM-thing is 90% marketing / fad and 10% substance.

author: wraper
author_rank: Unknown
timestamp: April 23, 2016, 02:35:53 pm
content: That "obsolete 8051" is not so obsolete. In average about 6-7x faster than original 8051 at the same frequency.

author: wraper
author_rank: Unknown
timestamp: April 23, 2016, 02:51:57 pm
content: BTW, cutting down the costs, I've done USB HID joystick controller with Attiny24A (2kB flash and 128 bytes of RAM), software USB, no built in hardware. About 400 devices in the wild, work perfectly as much as I'm aware. So all those expensive ARM with built in USB (which you do not get with cheap ARM) are not needed in many cases. But This wonderful MCU allows me to do much more at basically the same price (actually cuts the BOM costs because fewer external parts needed), so I won't ever bother with AVR anymore, I guess.

author: wraper
author_rank: Unknown
timestamp: April 24, 2016, 12:06:50 am
content: Quote from: blueskull on April 23, 2016, 11:39:33 pmCannot find any VBUS pin differences between the UB10/UB11 in the datasheet and reference manual, and even that P3.1 must be used for VBUS detection. In the development board P3.1 is connected to VBUS, so is not useable unless you remove R1057 jumper resistor from the PCB. BTW I made a typo, I'm using EFM8UB10F16G-C-QFN28, though I bought a few EFM8UB11F16G-B-QSOP24 too but haven't used them.

author: wraper
author_rank: Unknown
timestamp: April 24, 2016, 09:55:23 am
content: Quote from: blueskull on April 24, 2016, 12:51:28 amI do use it. Though the boards ordered have not arrived yet.

author: grantb5
author_rank: Regular Contributor
timestamp: March 15, 2019, 03:15:34 pm
content: Anysecondimpressions on the EFM8?I've used the SILabs C8051 F34x and F38x USB before and I see that the EFM8 is "more different" than I expected. Wondering what you or anyone else had to say now that this part has been around for a little bit. My plan is to use Keil/uV rather than Simplicity Studio.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 17, 2019, 10:38:22 pm
content: There is now also a EFM8UB3, that has 40k of code, for where 16k is not enough, and it includes the 4x Config Logic blocks, found in BB3/LB1..The UB2 should be similar to the F380 and the UB1/UB3 are newer designs