This is the version of the code to drive WS2812Bs that actually worked on my STM8S103F3 board. The actual bit timing is pretty close to as fast as possible (if you are calling the bit sending routines back to back with no code in between it will be exactly the minimum 1.25us total bit duration), however to avoid a string reset, you only have about a 4usec grace period (approximately 64 instructions) between sending bits.
I ended up rewriting the whole thing in assembler so that I don't have to babysit the compiler's code generation.
I've been toying around with STM8 microcontrollers lately because they're a happy medium between low-end PIC/AVRs and full-blown 28-40 pin 8-bit devices. The fact that you can get breakout modules (8k flash, 1k ram, hardware uart, spi and i2c) for under 100 yen shipped from the usual suspects doesn't hurt either.
With my new breakout board its much easier to talk to this device now. The only thing is that the module would occasionally randomly reset.
First thought was the signal levels on the TX/RX pins from 5v logic might not be tolerated well by the module so I popped in one of the PCA9306 logic shifter boards from Akizuki (even though its supposed to be for I2C/SPI it works fine for this purpose as well). Suddenly no more random resets so it seems that the ESP is not as 5v-tolerant on the signalling pins as some other 3.3v devices.
On to the firmware. Armed with the supposedly "best" current firmware from the Electrodragon site I proceeded to flash away. This firmware is much nicer than the version I had. Supports baud rate changing, which stays persistent through power cycles. Set the default rate back up to 115,200 so that I can also see the bootup diagnostics, which show up as line noise at the previous 9600bps default.
Quite often these days I'm presented with a project that has to mix between 3.3v and 5v devices. Interconnecting these devices is made a lot easier with the use of bidirectional logic level shifters.
Two of these devices that are fairly easy to obtain in Japan are the PCA9306 module from Akizuki Denshi at 150 yen and the BOB-12009 from Sparkfun, available for 310 yen from Sengoku.
After some back and forth with Bmobile:
The process is actually quite simple (unfortunately I did not take screenshots as I was doing it, and the screens for subscription/cancellation will be different now because I've already done it):
1. Log into your MyDocomo page:
a. Subscribe to the moperaU service
This procedure is intended to take a totally stock gingerbread sc-02c to the latest (as of this writing) CM10/Jellybean preview release.
What you need to download:
* Heimdall Win: https://github.com/downloads/Benjamin-Dobell/Heimdall/heimdall-suite-1.3...
Mac: https://github.com/downloads/Benjamin-Dobell/Heimdall/heimdall-suite-1.3...
Linux: https://github.com/downloads/Benjamin-Dobell/Heimdall/heimdall_1.3.2_i38...
* Siyah Kernel 2.6.13: http://gokhanmoral.desean.net/siyahkernel/v2.6/Siyah-v2.6.13-ntt.tar
There are a lot of random images for the Paladin floating around, some work, some don't, and information to install them is scattered all over.
Explanation and Procedure after the break:
In the process of retiring the machine that hosts this site I was forced to migrate it from drupal 4 to drupal 6 (well, actually a fresh install and a manual paste of the node data).
I got this Powershot A550 used at Sofmap after they discounted it another 1000 yen. Its a 7 megapixel model, only 1 year old. Total damage was less than 12,000 yen after adding a 2GB SD card.