Editing
FSM-55
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Intro == Having fun with LED matrices! == Getting Started == You have to clone the repository with the FSM-55 firmware first: git clone --branch cortex-m0-support git://git.gniibe.org/chopstx/chopstx.git Second step is to install and configure a cross-compiler for the ARM Cortex-m0: After configuring the cross-compiling environment, can compile the firmware by: * Change to directory where we have the code examples: example-fsm-55/ * Create a symbolic link to the FSM-55 board: ln -s ../board/board-fsm-55.h board.h * Compile the firmware: make Now, we are ready to upload the firmware to the board, but first we need to connect the board to the JTAG programmer. == Connecting your board == To program the board, we need to use a programmer with support to the SWD protocol. The most common tool is the proprietary device from ST-Electronics, ST-Link v.2. We are not very happy with it, since it has a proprietary firmware. Tentatively, you could try to use a Bus Pirate, which is supposed to support SWD. Usually, you just need two wires to connect your STM32: clock and data lines, but, for the FSM-55 we need the 'reset' line as well. So, here is the pinout: == Creating your message == The fun of this exercise is to create your own message and convert it to a C program. The program is organized in three threads: * LED thread (dynamic LED control) * Button thread (watchdog) * Application thread (text screen control) The user does not need to change the low-level threads (LED and Button), only the Application thread. The data flows from Application -> (some sort of) Video RAM -> LED control Messages are encoded in a 5 x 5 grid of LEDs. The 'led' thread loops through each column of 5x5 grid. ----- ----- ----- ----- ----- Each LED is addressed as such: - 0x00 * 0x00 * 0x00 * 0x00 * 0x00 * 0x00 - - * * * * - - - * * * - - - - * * - - - - - * In other to present the message "Happy Hacking!" only the characters we use (including exclamation point and space) are described: { 3, 0 }, /* SPACE */ { 4, DATA55V (0x1f, 0x04, 0x04, 0x1f, 0x00) }, /* H */ { 3, DATA55V (0x17, 0x15, 0x0f, 0x00, 0x00) }, /* A */ { 4, DATA55V (0x1f, 0x14, 0x14, 0x08, 0x00) }, /* P */ { 4, DATA55V (0x19, 0x05, 0x05, 0x1e, 0x00) }, /* Y */ { 4, DATA55V (0x0e, 0x11, 0x11, 0x0a, 0x00) }, /* C */ { 4, DATA55V (0x1f, 0x04, 0x0c, 0x13, 0x00) }, /* K */ { 3, DATA55V (0x11, 0x1f, 0x11, 0x00, 0x00) }, /* I */ { 4, DATA55V (0x1f, 0x08, 0x06, 0x1f, 0x00) }, /* N */ { 4, DATA55V (0x0e, 0x11, 0x15, 0x07, 0x00) }, /* G */ { 2, DATA55V (0x1d, 0x1c, 0x00, 0x00, 0x00) }, /* ! */ The message is represented as a string: static uint8_t hh[] = { CHAR_H, CHAR_A, CHAR_P, CHAR_P, CHAR_Y, CHAR_SPC, CHAR_H, CHAR_A, CHAR_C, CHAR_K, CHAR_I, CHAR_N, CHAR_G, CHAR_EXC, CHAR_SPC, CHAR_SPC, CHAR_SPC, }; == Uploading your code == == Authors == Gniibe is the author of the FSM-55. Unixjazz and Gniibe are the authors of this tutorial. It is released under [https://creativecommons.org/licenses/by-sa/2.1/jp/deed.en_US CC-BY-SA-2.1 JP]. Feel free to redistribute it and modify it for your needs. == References ==
Summary:
Please note that all contributions to Noisebridge are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Noisebridge:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Request account
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Dig in!
Noisebridge
- Status: MOVED
- Donate
- ABOUT
- Accessibility
- Vision
- Blog
Manual
MANUAL
Visitors
Participation
Community Standards
Channels
Operations
Events
EVENTS
Guilds
GUILDS
- Meta
- Electronics
- Fabrication
- Games
- Music
- Library
- Neuro
- Philosophy
- Funding
- Art
- Crypto
- Documentation/Wiki
Wiki
Recent Changes
Random Page
Help
Categories
(Edit)
Tools
What links here
Related changes
Special pages
Page information