Using a BOLYMIN BF160160D graphics LCD with the Makingthings Make Controller and the CMG-Framework
Hardware The Bolymin BF160160D graphics display uses a Epson S1D13700 Controller with a 8 bit port (D0-D7) and four control inputs (A0, WR, RD, DISPL_OFF) plus CS and RESET. In general one could use whatever graphics LCD as long as it uses S1D13700 controller (or one of the other controllers CMG supports). Since the LCD-Module comes with a ZIF connector, I created a adapter PCB to connect to the makingthings interface board:  Later on I had to add/ change two things, the SEL line needs to be connected to GND to select the 8080 mode (no need to use a precious IO for that), so I soldered a wire directly on the PCB, and I added a potentiometer for contrast (10k). You can see these changes in the circuit diagram, which also contains a FET to switch the backlight LED (power saving function). All resistors in the data lines are 1206 0 Ohms (or solder bridges), these will be removed in the next PCB version (see below), R1 stayes 100 Ohms. New Board Schematics:  New PCB:
Connections Here is how I connected the adapter board with the makecontroller Interface Board, but you can use whatever portpin you like but then you have to change the setup accordingly in CMG_LLIO_ARM_SAM7X_8D4CTL_8080.c CMG_D0 IO_PB20 CMG_D1 IO_PB19 CMG_D2 IO_PA24 CMG_D3 IO_PA25 CMG_D4 IO_PA04 CMG_D5 IO_PA03 CMG_D6 IO_PA00 CMG_D7 IO_PA01 CMG_A0 IO_PB21 CMG_CS IO_PB22 CMG_WR IO_PB23 CMG_RD IO_PB24 CMG_RST IO_PB25 CMG_DISP_OFF IO_PA23 CMG_BKLGHT IO_PA15 GND to GND and +3V3 to +3.3V Here you can download the old PCB version (there is also a SPI SD-Card adapter in this file), but keep in mind that you will have to add the connection from SEL to GND and the contrast potentiometer. Updated/ Corrected PCB PDF-File can be downloaded here, the Eagle 5 project files can be downloaded here. Links: BOLYMIN Taiwan Epson S1D13700 Controller Software On the software side I decided to give the CMG framework from Christian Merkle a try. I had read an article about the CMG framework in the Embedded Projects Journal No. 1 which sounded really promising. You can find more information here: Embedded Projects Magazine No. 1 page 17/18 (the article is in German only, sorry) CMG framework home CMG Subversion His Masters thesis PDF and files CMG supports the following controllers (as of May-22-2009): - S1D13700
- S1D13305
- SED1335
- T6963
- LH155
So if you got a display with one of those controllers it should work just fine (you have to tell CMG which one you want to use). How to get CMG The svn access didn't work for me, so I contacted Mr. Hoegl (Christian Merkles supervisor) and he send me the latest SVN version via mail, and promised to fix the SVN problem soon (something to do with user rights). CMG currently supports the X86, AVR and on the ARM7 platform only the LPC22xx controller. I needed support for the AT91SAM7X which is used by the makingthings.com MAKE Controller board/ OS, so I created a makingthings version of LILO (Low Level IO) for AT91SAM7X which consists of two files: CMG_LLIO_ARM_SAM7X_8D4CTL_8080.c CMG_LLIO_ARM_SAM7X_8D4CTL_8080.config you can download the makingthings version of CMG here (260kb) On OS X copy this file in /Applications/mcbuilder/cores/makecontroller/libraries/ and unpack it. Since this library is currently not part of the official makingthings OS/ framework and wouldn't compile via the makingthings mcbuilder GUI because the makefile generated by mcbuilder doesn't contain the paths to CMG, so we have to do compilation with my modified makefile via terminal. Here is the makingthings CMG project I created out of the demo code supplied with CMG. I changed a few things on the makingthings IO.c library, take a look at this article (coming soon) to see what needs to be changed, otherwise it won't compile. Or you can download my modified version here and replace your cores folder of the makingthings system. In order to compile and upload the CMG_LCD_BF160160D project: - unpack the file
- open a terminal
- cd to your unpacked project build folder
- type make clean
- type make
- erase your board (close ERASE jumper AND unplug/ plug power)
- upload the file to your board with "/Applications/mcbuilder/resources/tools/sam7 -e set_clock -e unlock_regions -e "flash cmg_lcd_bp160160d.bin" -e boot_from_flash -e reset"
If everything works out you should see something like this: 
Here another image taken from the back (the upper board is the SPI-SD card adapter board designed for using EFSL with the makingthings controller board).
|