OLED 8051 89c51 89c52 dot martix lcd
you are now at: Product > Engineer's Toy -- BFU-8051-OLED-V1
Quick bookmarks:
|
||
|
|
|
|
|
|
|
Schmatics and PCB layout
Operating View |
Bottom view |
Schmatics (click image to download) |
PCB top view of copper traces |
PCB top view of siklscreen |
PCB bottom view of copper traces |
PCB bottom view of silkscreen (Mirrored) |
Product Description: |
This is a development kit included a 8051 sturucted MCU and OLED. I use it to develop and test our products usually. You can use it to replace 89C51, 89C51, 89S51, 89S52 or other 8051 series MCU with the sample program code directly. But, ofcourse, beware the pin assignment and outline package(if needed). It includes: |
|||||||||||||||||||||||||||||||||||||||||
Mainly for:
|
Helpful for product development cause lots of consumer electronic products are embedded OLED. End user can know the status of the devices. Such as showing time, showing temperature, showing caller's ID on phone or other accessories. Also, it is a good educating kit for students. Small in size, thus easy to integrate. Such as "Robot car", "FM radio" ETC. |
|||||||||||||||||||||||||||||||||||||||||
(Click and back to top) | ||||||||||||||||||||||||||||||||||||||||||
Designer's choices: |
(Why chosing these components) | |||||||||||||||||||||||||||||||||||||||||
MCU: STC12LE5A60S2 |
1. You can buy it very easily. No MOQ (minimum order quality). | |||||||||||||||||||||||||||||||||||||||||
(get English STC12LE5A60S2 Datasheet) (get Chinese STC12LE5A60S2 Datasheet) |
2. The information of this chip is open to public. You can found sample code, Datasheet, Application Schmatics on internet. | |||||||||||||||||||||||||||||||||||||||||
3. It using "8051" structure. Which is easily to learn for students. And fully compatible with 8051 assembly code and C code. | ||||||||||||||||||||||||||||||||||||||||||
4. It is embedded A/D convert. You may use it for analog detecting input such as "Thermal resistors" for meausreing tempure. | ||||||||||||||||||||||||||||||||||||||||||
5. Supporting ISP(In system programming) and even POWER ON PROGRAMMING. Just using UART (Rx and Tx) 2 pins to programming. I just use this feature for upgrading firewares of end products. | ||||||||||||||||||||||||||||||||||||||||||
6. 60k programable flash, which can store a larger program code. | ||||||||||||||||||||||||||||||||||||||||||
7. Ofcourse the price is low. Ha Ha Ha. | ||||||||||||||||||||||||||||||||||||||||||
1. It embedded a voltage booster which is required to light up LEDs. Otherwise, you may need to build one in your cirucit. | ||||||||||||||||||||||||||||||||||||||||||
(datasheet is confidential by manufacturer. You will get this datasheet by email once you buy this moudle) | 2. It using I2C communicating protocol. That reduces using I/O ports of MCU. | |||||||||||||||||||||||||||||||||||||||||
3. Small in size. I will use it in our products. Thus a product designer would use it usually in consumer electronic products. | ||||||||||||||||||||||||||||||||||||||||||
4.Using SSD1306 common display driving controller.(get datasheet) | ||||||||||||||||||||||||||||||||||||||||||
(Click and back to top) | ||||||||||||||||||||||||||||||||||||||||||
Information about OLED 96*16 | 1) Using SSD1306 driving controller |
|||||||||||||||||||||||||||||||||||||||||
(Click and back to top)
|
||||||||||||||||||||||||||||||||||||||||||
(Click and back to top) | ||||||||||||||||||||||||||||||||||||||||||
Downloads and Datasheets | STC12LE5A60S2 - chinese datasheet | MCU on the module: "BFU-8051-OLED-V1" | ||||||||||||||||||||||||||||||||||||||||
STC12LE5A60S2 - English datasheet | MCU on the module: "BFU-8051-OLED-V1" | |||||||||||||||||||||||||||||||||||||||||
SSD1306 | Driving IC embedded in OLED | |||||||||||||||||||||||||||||||||||||||||
STC-ISP-V488-english.exe | Software tool for downloading program. | |||||||||||||||||||||||||||||||||||||||||
AT24C04 | EEPROM for store parameters | |||||||||||||||||||||||||||||||||||||||||
Sample C test program | The test program in C statement | |||||||||||||||||||||||||||||||||||||||||
*** copyright by John Mak, BFU Compnay *** | ||||||||||||||||||||||||||||||||||||||||||
C51-8051-OLED-TEST-A.hex (Right clike save) | the test program directly downloaded for testing | |||||||||||||||||||||||||||||||||||||||||
*** copyright by John Mak, BFU Compnay *** | ||||||||||||||||||||||||||||||||||||||||||
BFU-OLED-char converter.xlsm | Dot-matrix converter tool in EXCEL file *** copyright by John Mak, BFU Compnay *** |
|||||||||||||||||||||||||||||||||||||||||
STC.cdb | file needed for Keil C complier. | |||||||||||||||||||||||||||||||||||||||||
(Click and back to top) | ||||||||||||||||||||||||||||||||||||||||||
Programming the MCU | ||||||||||||||||||||||||||||||||||||||||||
Things you have to prepare before programming this MCU. | ||||||||||||||||||||||||||||||||||||||||||
1 . |
A "USB to TTL" or "RS232 to TTL" converter. Which connects computer port and gives "Tx" and "Rx" signals in "TTL" format which is needed for programming MCU. You may find lots of them on internet. Or you may buy one from us (made by other manufacturer).
|
|||||||||||||||||||||||||||||||||||||||||
2 . |
Get a software for downloading program STC-ISP-V488-english.exe (click to get it). or visit http://www.stcmcu.com/ for updates | |||||||||||||||||||||||||||||||||||||||||
The operation of programming MCU: STC12LE5A60S2 | ||||||||||||||||||||||||||||||||||||||||||
1 . |
Connect the USB-TTL converter like that: (Attention to: Txd -> Rxd pair) |
|||||||||||||||||||||||||||||||||||||||||
2 . |
Open the software tool: STC-ISP-V488-english.exe(click to get it). | |||||||||||||||||||||||||||||||||||||||||
Then choose a hex file which you want to download . | ||||||||||||||||||||||||||||||||||||||||||
Choose the correct come port to USB-TTL converter (you may check that in control penal > system) | ||||||||||||||||||||||||||||||||||||||||||
Click"ISP programming" button on middle left. And then wait. | ||||||||||||||||||||||||||||||||||||||||||
3 . |
Attention the the ISP TOOL starts to download only when the MCU is reset or at the moment of power on. | |||||||||||||||||||||||||||||||||||||||||
A. You may press the reset button on our USB-TTL converter (buy from us). | ||||||||||||||||||||||||||||||||||||||||||
B. You may pwoer-off and then power-on to reset MCU for downloading. | ||||||||||||||||||||||||||||||||||||||||||
C. "Power-on downloading" just like the video to show "Power-on downloading". embedded a "reset function" and call it. The "reset function" is shown on the sample C code. | ||||||||||||||||||||||||||||||||||||||||||
Soft reset C statement : |
Adding this statement " IAP_CONTR = 0x60 " in your C program to reset MCU for downloading; | |||||||||||||||||||||||||||||||||||||||||
Below video shows ISP downloading(in sysetm programming) and Power-ON downloading. | ||||||||||||||||||||||||||||||||||||||||||
ISP downloading : Power-On downloading : |
||||||||||||||||||||||||||||||||||||||||||
For higher video quality http://youtu.be/cruMLEXyhaE?hd=1 | ||||||||||||||||||||||||||||||||||||||||||
Below video shows downloading program with Li-battery connected. | ||||||||||||||||||||||||||||||||||||||||||
For higher video quality http://youtu.be/lW0LDFaaG0w?hd=1 | ||||||||||||||||||||||||||||||||||||||||||
(Click and back to top) | ||||||||||||||||||||||||||||||||||||||||||
Sample C code (Test program) |
*** copyright by John Mak, BFU Compnay *** | |||||||||||||||||||||||||||||||||||||||||
Brief : |
This MCU : STC12LE5A60S2 using 8051 instructions. Thus if you built a Assembly of C program (Such as 89C51, 89S52.etc.) And complier in to BIN or HEX files. You can just use you own program and download to MCU directly. And it works. | |||||||||||||||||||||||||||||||||||||||||
This is the program pre-downloaded to the "BFU-8051-OLED-V1" for test. Thus we promise it 100% works before shipping. Once you receive this module. You can test it by connecting power source. | ||||||||||||||||||||||||||||||||||||||||||
Please refer to STC MCU datasheet for more programming information. | ||||||||||||||||||||||||||||||||||||||||||
Machine HEX file : |
C51-8051-OLED-TEST-A.hex (Right clike save)-- this is the hex file to download to the MCU directly | |||||||||||||||||||||||||||||||||||||||||
*** copyright by John Mak, BFU Compnay *** | ||||||||||||||||||||||||||||||||||||||||||
Main program in C : |
C51-8051-OLED-TEST-A.C | |||||||||||||||||||||||||||||||||||||||||
*** copyright by John Mak, BFU Compnay *** | ||||||||||||||||||||||||||||||||||||||||||
Header files included : |
The program include these headed files: (click to see and download) | |||||||||||||||||||||||||||||||||||||||||
#include<STC.h> -- *** copyright by John Mak, BFU Compnay *** #include<fm5820-I2C.h> #include<ssd1306_oled.h> #include<SSD1306_OLED_FONT.H> #include<SSD1306_OLED_graphic.H> #include<INTRINS.H> #include<BFU_8051_OLED_V1_functions.h> |
||||||||||||||||||||||||||||||||||||||||||
(Click and back to top) | ||||||||||||||||||||||||||||||||||||||||||
Dot-matrix software tool : |
It is wise that you may use a "dot-matrix software tool" to do make images. You may find some on internet. Well, for convenience of my program structure, I made one myself by MS EXCEL Macro programming. BFU-OLED-char converter.xlsm (Click to get it) *** copyright by John Mak, BFU Compnay *** |
|||||||||||||||||||||||||||||||||||||||||
The openning image is stored in the header file <SSD1306_OLED_graphic.H> | ||||||||||||||||||||||||||||||||||||||||||
(Click and back to top) | ||||||||||||||||||||||||||||||||||||||||||
C Complier : |
You may need 8051 C complier to make your C program into "HEX" file (the machine code going to be downloaded into the MCU memory. I use "Keil C UV4 ", just for your reference, you may use others. | |||||||||||||||||||||||||||||||||||||||||
There is some hints when using "Keil C ". | ||||||||||||||||||||||||||||||||||||||||||
Hint 1 : |
For a larger program (such as our test program). You need to active some function in Keil as shown below. | |||||||||||||||||||||||||||||||||||||||||
click inage to enlarge | ||||||||||||||||||||||||||||||||||||||||||
Hint 2 : |
Import STC models information into Keil C | |||||||||||||||||||||||||||||||||||||||||
Please click to get the file STC.cdb . This is the "cbd" file need for Keil C UV3 and UV4.Then follow the steps below: Step 1: Step 2: Step 3: |
||||||||||||||||||||||||||||||||||||||||||
For more information, Please visit to http://www.stc-51.com/ -- the manufacter of the STC MCU | ||||||||||||||||||||||||||||||||||||||||||
(Click and back to top) | ||||||||||||||||||||||||||||||||||||||||||
Mini project for reference | FM radio with OLED display, ( Using the sample C program as above ) | |||||||||||||||||||||||||||||||||||||||||
For higher video quality http://youtu.be/sYugdUqpRB0?hd=1 | ||||||||||||||||||||||||||||||||||||||||||
It is using RDA5820 FM chip. This test program only for testing, not for END product. |
||||||||||||||||||||||||||||||||||||||||||