E-Paper Device (EPD) based MiniNote module, powered by mbed on LPC1114FBD48. Shared in public domain with enclosure in 3D step format, hardware interface compatible with microBUS interface. Anyone can contribute on this project.
E-Badge MiniNote Project on mbed/NXP LPC1114 platform
- About E-Badge MiniNote Project
- E-Badge Firmware Design
- Enclosure ID in 3D step format
- Python utilities
- Demo applications
- New applications with cloud server
- make mbed looks Arduino compatible
- debug in Keil, shared with mbed
- make it bigger with more memory
- make it smaller with mini connector
- make it stronger with mikroBUS
- Make it pretty with line art
- Developement Status Update
Diff: SSD1606/ssd1606.cpp
- Revision:
- 3:1fa000d4da94
- Parent:
- 2:bb9f154ea2f4
diff -r bb9f154ea2f4 -r 1fa000d4da94 SSD1606/ssd1606.cpp --- a/SSD1606/ssd1606.cpp Mon Jun 09 11:01:38 2014 +0000 +++ b/SSD1606/ssd1606.cpp Wed Jun 11 09:12:36 2014 +0000 @@ -49,21 +49,23 @@ _reset = 1; wait_ms(1); _reset = 0; - wait_ms(5); + wait_ms(1); _reset = 1; - wait_ms(5); + wait_ms(1); } void SSD1606::read_busy() { - while(_busy==1){ - wait_ms(1); + while(1) + { + asm("nop"); + if(_busy==0) + break; } } void SSD1606::initialize() { - reset(); _send_command(0x10); _send_data(0x00); #ifdef MODE3 @@ -196,7 +198,7 @@ void SSD1606::clear() { - for (int i=0; i<FRAMEBUF_SIZE; i++) + for (int i=0; i<3096; i++) _send_data(0xFF); _cursor_x = 0; _cursor_y = 0; @@ -204,18 +206,21 @@ void SSD1606::_vspi_write(unsigned char value) { + unsigned char tmp; + tmp = value; + for (int i=0; i<8; i++) { - if(value & 0x80) + if(tmp & 0x80) { _data = 1; }else{ _data = 0; } - _data = _data<<1; _clk = 1; wait_us(SPI_BUS_DELAY); _clk = 0; + tmp = tmp<<1; } } @@ -258,9 +263,9 @@ { int i = 0; unsigned char x, y; - for (x=0; x<SSD1606_LCDHEIGHT; x++) + for (x=0; x<SSD1606_WIDTH; x++) { - for (y=0; y<SSD1606_LCDWIDTH; y++) + for (y=0; y<COLBUF_SIZE; y++) { i++; if (i<pix) @@ -298,3 +303,12 @@ void SSD1606::set_font(unsigned char *font, unsigned char width) { } + +void SSD1606::_send_data_1bpp(unsigned char value) +{ + unsigned char temp; + temp = EPD_2bpp_LUT[value & 0x0F]; + _send_data(temp); + temp = EPD_2bpp_LUT[value>>4 & 0x0F]; + _send_data(temp); +}