I had a need to program SPI eeproms so looked around and found this for Arduino and off-course
it requires a 3.3V Arudino, I only had the Blue pill clone so I adapted the code and modified it
slightly to work with the pill attached is the connection schematics and code.
I was rummaging through my collection of old hardware and came across a HP storage module labeled:
HP StorageWorks
Modular smart array 500 G2
and it had a nice LCD on it so decided to see if we can use for something.
After extracting it, it became obvious that it was a separate module with:
* LCD
* Microcontroller
* buttons
* Dual color leds
* EEPROM memory
all in the small board !
Printed on the board :
C51343NFU
OPTREX Made in taiwan 284-3
Let the hacking commence.
So what's inside it:
* Microcontroller - PIC16F877 , (Not the A variant)
* LCD - HD44780 variance
* EEPROM - 24c32 I2C 4K
* 3 Dual color leds. (green and red)
2 - single leds, connected to the same output pin. (red)
A RC Oscilator of unknown speed.
That's great they even left pads for in circuit programming.
Here are the connections:
You will need an ICSP capable programmer, to program it.
Word of warning while programming, connect the 5V line to an external power source, most
programmers have insufficient current to supply the board.
I successfully programmed it with Pickit 3 and the Minipro programmer.
The LCD has weird display ROM the character map is "funky" to say the least, only space numbers and English letters are where they supposed to be, everything else requires some searching.
Attached is the source code which is in C, for MLAB X ide.
I have modified my version and added a 20Mhz crystal, I've removed a resistor (R24) from the RC circuit and added a resistor between MCLR and 5V, the code is written for the Crystal, should work for RC but the config bits need to be changed.
Here is a quick way to configure a TFT display with a ILI9341 driver.
This should work with most (if not all) of Orange PI boards that are based on H3 (no Pi Zero).
I use Armbian as the OS.
such as:
to:
here are the connections that are needed:
Once connected, install Armbian for your board and connect to a network.
Find the IP of the device (connect to a screen and a keyboard, use the log of the router and etc.)
Putty/ssh to it, login (user: root pass:1234 , it's the default values - please change the password to something more secure) The TFT screen should be ON (white or black screen) with nothing on it.
Create a new file /etc/modules-load.d/fbtft.conf with the following content:
fbtft_device
Create another file /etc/modprobe.d/fbtft.conf with the
Here is a schematic for a convenient circuit to connect a micro to RS232 (COM) port using only common parts, no MAX232 and such.
BOM:
C1 220pF
D1 1N4007 - Can be almost any regular diode
J1 DB9
P1 CONN_4 - Can just use wires
Q1 BC558 - PNP Transistor can probably use any PNP transistor
Q2 BC547 - NPN Transistor can probably use any NPN transistor
R1 10K
R2 10K
R3 10K
R4 3.3K
R5 3.3K
R6 3.3K
PIN 1 requires VCC the same voltage that the Microcontroller uses
Tested up to speeds 115200, used in many projects, ESP8266,sniffing router ports and the likes.
Found an old LED display from a Motorola MicroTAC with the markings SDA5714
Looked around the internet and found info mostly in Russian and with different code for atmel but not Arduino, decided to create a sketch with pinouts and a comprehensive example that uses both rows and the other LEDs (phone icon dots and etc), the font is implemented in the code, so you can modify it.
So here it is in action.
1. Visualizer that uses the stellaris launchpad RGB (uses red and blue - left and right cahnnels)
2. S3M and MOD formats supported (detected by extension)
3. SD card support (using SPI mode on SSI0)
Limitations:
1. Because of the memory constraints the player only support up-to 14 channels mods
2. Some mod/s3m will not be able to played smoothly because our far buffers are quite small.
3. There are only 1100 bytes of free RAM left.
4. Put all the mods in a folder called "mods" in the root of the sd card
I'm not sure fat32 is supported....
I've added a small LC filter to the output to limit the high frequency signals.
Here is a site that is help-full link , you don't have to use it but it gives a better sound.
(My cutoff frequency is 10Khz)
Schematics:
Audio:
Left PB1
Right PB0
SD card:
SCK (clock) - PA2
CS (Chip select) - PA3
MOSI (Master out slave in - DI) - PA5
MISO (Master in slave out - DO) - PA4
Usage:
Right button next song, Left button previous song.
Added SD Card, S3M and visualizer support see here link.
Recently I got myself a Stellaris Launchpad board by TI and thought what I could do with it.
I decided to create a simple MOD player with the bear minimum of extra parts and so here is the
result:
The video recording was done using PC LINE IN and in stereo and because of that there is a faint whine in the background but the sound that comes directly from the board is much better.
The board supports only 4 channel MODs technically you can put a MOD with more channels but there is no memory allocated for them, so the results are unpredictable.
There is enough space on the device for 213Kb of MODs.
Right now the code is set to take up-to 6 MODS, you can change it if you want (as long as you keep below the 213Kb limit)
Because I did not have an SD card breakout board I had to load the files from somewhere
so I've created VFS (Virtual File System) which helped a lot during development, the files reside inside the
flash of the MCU.
It should be fairly easy to switch to FatFs since I've used the same prototype functions.
SD support will probably come in the future (when I get a SD breakout board)
Technical difficulties:
While porting this I've encountered several difficulties:
1. The amount of RAM on the pic32 device was 3 times what we had (96K vs our 32K)
had to shrink the buffers a lot, will see how it affects while reading from SD card.
2. PWM code completely different, had to understand both architectures and settings to rewrite
it correctly.
3. Timing for the sampler interrupt is CRITICAL even a small difference in invocation
would cause popping and beeping in sound.
4. Interrupt priorities, after adding the buttons handling (which are polled using the systick interrupt) I've noticed that the sound would be distorted, which I've concluded was due to the sampler interrupt not getting enough time to run or was itself was being interrupted, a code to set priorities to interrupts was added.
Hardware:
1 x Stellaris Launchpad
1 x Audio Jack
Schematics:
Take the audio jack connect the GND pin to the GND pin on the board J3.2
LEFT channel is J1.7 (PB4)
RIGHT channel is J2.7 (PB6)
Usage:
Right button next song
Left button previous song.
If connected to computer the serial terminal writes some info about the song that is playing.
File:
Attached is the whole project, source, binary and convert tool for mods. Download project.
To use the convert tool: after extracting the project to Stellarisware directory. NOTICE: My Stellarisware directory is called Stellarisware2 so some adjustments might be necessary in order to compile the sources, the project should be placed next to the other projects: C:\StellarisWare2\boards\ek-lm4f120xl\modplayer
go into the tools directory copy all your wanted MODS to that dir and run "runconvert.bat"