k64f lcd panel adafruit quotation
This is Part 3 of a Mini Series. In Part 2, I described how to set up the development tools and to debug the first project (see “Tutorial: Adafruit WS2812B NeoPixels with the Freescale FRDM-K64F Board – Part 2: Software Tools“). Now it is time to look into the software concepts. The goal is to drive Adafruit’s NeoPixel (WS2812B) with the Freescale FRDM-K64F board:
This article explains the protocol and timing to talk to the WS2812B (or Adafruit NeoPixel) LEDs. It explains an approach with timers and DMA to meet the hardware requirements. I’m using GNU ARM Embedded (launchpad) tools with an Eclipse based IDE (Freescale Kinetis Design Studio v3.0.0). As software drivers I’m using the Freescale Kinetis SDK v1.2.
The WS2812B is the never variant, and has slightly different timing. The newer Adafruit NeoPixels are all WS2812B. As the timing has some tolerances, I’m driving it with the following timing for ‘0’ and ‘1’ bits:
That way the operation can happen in the background, without CPU involvement :-). And good new is: many modern microcontroller have DMA capabilities, and the Kinetis K64F on the FRDM-K64F board does have it too :-).
This is Part 5 of a Mini Series. In Part 4, I described how to set up the FTM (Kinetis Flex Timer Module) to generate the required waveforms used for DMA operations (see “Tutorial: Adafruit WS2812B NeoPixels with the Freescale FRDM-K64F Board – Part 4: Timer“). In this post I describe how to use to trigger DMA (Direct To Memory) events. The goal is to drive Adafruit’s NeoPixel (WS2812B) with the Freescale FRDM-K64F board:
In this article I use DMA (Direct Memory Access) to do memory to memory operations to generate the required bit stream for the WS2812B LEDs. In the previous tutorial I have used the FTM of the FRDM-K64F device to generate three signals:
I’m using DMA on the FRDM-KL25Z board for things like reading ports in a DIY Logic Analyzer, or driving WS2812 pixels. The ARM Cortex-M4F microcontroller on the FRDM-K64F board has an eDMA (enhanced DMA) controller on it. It can use up to 16 independent DMA channels for DMA operations, with advanced source/and destination address calculations. That eDMA controller is described in the K64F Reference Manual.
I have been trying to initialise my Adafruit 7" TFT for some time but no matter what combination of programs and library"s I try I have only ever got a blank white screen at best.
I have been mainly using David Smarts RA8875 library https://os.mbed.com/components/RA8875-Based-Display/ and variations of it. Somebody has made a fork of it for use with the K64F"s but this still does not work. https://os.mbed.com/teams/FRDM-K64F-Code-Share/code/RA8875_KeyPadDemo/
This is Part 1 of a Mini Series. Manya has challenged herself to use the Adafruit NeoPixels (WS2812B RBG LEDs) with the Freescale FRDM-K64F board and the Kinetis SDK (see “Let’s play with Freescale FRDM-K64F“). I did a while back that with the FRDM-KL25Z board (see “NeoShield: WS2812 RGB LED Shield with DMA and nRF24L01+“). I used Processor Expert in my project (without the Kinetis SDK), and with this setup it is very easy. However, Manya wanted to do this with the Kinetis SDK and without Processor Expert. No surprise to me, she has found out that this setup with the Kinetis SDK and without the usage of Processor Expert is much more challenging (see “Not done yet!!“). I promised to Manya to give her a helping hand, so here we go! :-)
I’m starting here a mini series of articles how to use the FRDM-K64F board from Freescale with the Adafruit WS2812B LEDs (Adafruitnamed them ‘NeoPixels‘). I’m using the Freescale Kinetis Design Studio V3.0.0 (Eclipse based IDE with GNU ARM Embedded (launchpad)) with the Freescale Kinetis SDK. This first part covers how to set up the hardware.
The WS2812B logic level is 5V. As the FRDM-K64F board is using 3.3V, I need a very precise and fast (!) logic level shifter which translates the 3.3V to 5.0V, such as the 74AHCT125 or 74HCT245.
You need the following hardware:A Freescale Freedom board. I use the FRDM-K64F in this article. You can use any other board, but then you need to use potentially a different pin to talk to the LEDs.
A good 5V power supply, depending on the amount of pixels/WS28122 you are using. E.g. the 5V 10A from Adafruit (http://www.adafruit.com/products/658). Consider as well a power jack to screw terminal adapter (http://www.adafruit.com/products/368)
In the picture I use a USB breakout board (http://www.adafruit.com/products/1833) connector as power supply: that way I can power a few LEDs from my laptop USB port (up to 500 mA) without the need for an external power supply, or using a wall USB power supply (I have one powering up to 2 A :-)).
Every Adafruit NeoPixel Board uses GND, 5V and DIN (Data IN). Connect these lines to the circuit described above. Solder wires or use headers where applicable. The picture shows a 8×8 NeoPixel Matrix on the left and a 8 pixel board stripe on the right: