Optixx

A Blog about Linux and Console Hacking

Archive for the ‘News’ Category

Nokia 6100 LCD

Sunday
Jan 7,2007

Got my Nokia 6100 LCD working. Long story of failures. First try was a LCD with a Epson controller from ebay for 10 Euros. But somehow someone failed to solder the smd socket proberly and it went a way ;-) ( thx max ) .

Next try was a Epson based LCD including a header board from sparkfun . But this time i wasn’t able to run some demo code which was made for the LPC2138 on my LPC2148. I think the board was to fast to talk to the display. I wasn’t able set up SPI on the LPC2148 correct. Need more investigation on that topic.

So i gave up at this point and decided to go for a atmega16. I did a devel board for that which is losy based on this schematics. The boads uses simple parport icsp and has a serial line for debugging and sending data.

Finally i threw some code together using the init commands found in this project. Added support for receiving images via uart and wrote an little python client for sending images.

Future plans are to port the glcd lib to the epson based lcd.

pic1 pic2

download source

EFSL for the ARM LPC2148

Tuesday
Dec 19,2006

Found a LPC2138 port of the Embedded Filesystems Library. Took this stuff and made this working on my LPC2148.

Now i can access an SD-Card attached to the LPC2148. Currently the FAT filesystem is supported. The sample pgramm includes an minimal serial line shell which supports file reading and directoy listings.

MMC/SD Card Filesystem Test (P:LPC2148 L:EFSL)
CARD init...spiInit for SSP/SPI1
Card is initialising.
CSD: 00 26 00 32 5F 59 83 C8 BE FB CF FF 92 40 40 D7
Drive Size is 1015808000 Bytes (1984000 Sectors)
Init done...
Press Command: d r a 
You pressed : d
Directory of 'root':
TEST01      ( 6 bytes )
TEST02      ( 6 bytes )
TEST03      ( 6 bytes )
TEST04      ( 6 bytes )
TEST05      ( 6 bytes )
TEST06      ( 6 bytes )
TEST09      ( 6 bytes )
TEST10      ( 6 bytes )
LOGDAT9 TXT ( 833 bytes )
DUMMY   LOG ( 2754 bytes )

download source

ARM LPC2148 and Linux

Monday
Dec 18,2006

Just got my ARM LPC2148 Dev Board from Olimex

I put together a small overview how to get things working using a linux host system.

Toolchain

  • GNU Compiler Toolchain
  • Serial Programmer
  • Sample Code

  • Crt0
  • Linkerscript
  • Init Routine
  • Simple IO Test
  • SIO Debug Console
  • GNU Compiler Toolchain

    I use a standard arm GNU toolchain. Actuallay found this binary download from mikrocontroller.net. But also my GBA Toolchain worked and produced good binaries. So a Gentoo ARM Crossdev should to the work. Think that the LPC is not too picky about that.

    Serial Programmer

    I tried lpc21isp but it didn’t work for me. So i ended up using lpc2k_pgm. It has little gui and where you can setup all needed configs. I use iHex format to upload to the dev board, where i had best results using quite slow sio speed like 9600bps. You have to enable BSL on the LPC2148 for ICSP. On my LPC the switch is called ‘ICSP1′ which needs to be set into ON position.

    Crt0

    Nothing special about that. Took it from similar LPC based projects.Just setup stack sizes and default IRQ vectors. Worked out of the box.

    Linkerscript

    Tooks this from a other LPC project. The script specifies the memory layout of the target system and defines the sections for the binary output.

    Init Routine

    Code found in startup.c does the PLL init. The LPC2148 has 12 Mhz internal crystal but can run up to 60Mhz when setting the PLL. Also the default IRQ Handlers are defined here.

    Simple IO Test

    I used the on-board leds for a simple IO test.

    
    int main(void)
    {
        unsigned int i;
        Initialize();
        ConsoleInit(60000000 / (16 * BAUD_RATE));
        puts("Init done\n");
        IODIR0 |= 1 < < 10;          // P0.10 is an output
        IODIR0 |= 1 << 11;          // P0.10 is an output
        IOSET0 = 1 << 10;           //LED off
        IOSET0 = 1 << 11;           //LED off
    
        while (1) {
            for (i = 0; i < 1000000; i++);
            IOSET0 = 1 << 10;       //LED off
            IOCLR0 = 1 << 11;       //LED on
            puts("led1: off  led2: on\n");
            for (i = 0; i < 1000000; i++);
            IOCLR0 = 1 << 10;       //LED on
            IOSET0 = 1 << 11;       //LED off
            puts("led1: on   led2: off\n");
        }
    }
    

    SIO Debug Console

    Addes a little module that uses one of the two serial line for debugging output. I use the same serial port as for for the ICSP, so after the flashing lpc2k_gpm will display the output directly without any setup changes.

    pic1 pic2 pic3

    download source

    Gnuboy AALib

    Wednesday
    Dec 13,2006

    This is really usefull, isn’t it. Made a video driver for gnuboy based on aalib. The sound it actually done by sdl lib. But i don’t care about sound to much because this thingy is meant to be played via telnet. So hook up the aagnuboy binary into xinted and have fun.

    service aagnuboy
    {
        disable         = no
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        log_on_failure += USERID
        port            = 1989
        server          = /usr/local/bin/aagnuboy 
        server_args     = /usr/local/games/roms/demo.gb 
        log_type        = SYSLOG daemon info
    }
    
    

    pic1

    download gnuboy

    Return of the SNES

    Wednesday
    Dec 13,2006

    Updated my old SNES demo a little so that it runs on real hardware. Was able to get my handy on a half broken Super Wild Card. So i finally i fixed the rom headers and now the little demo runs on a real snes. Nice.

    Snes Snes

    Snes Snes

    Source

    PSP Futurecomposer Player

    Wednesday
    Dec 13,2006

    Made a Futurecomposer player to the PSP. This version is hacked together from the xmms-fc and the fcplay sources. First i did x86 version using alsa interface. Later ported this over to the psp using the native audio interface. Memory footprint is quite ok, despite the fact that the old FC engine is written in c++ so that the whole stuff has to be linked against libstdc++ which makes the player kind of bloated.

    pic1

    download fcplay

    Sidplay

    Friday
    Dec 1,2006

    Ported the original sidplay to the PSP. Now i use the native pspsdk audio libs so SDL is not needed anymore. This reduces the footprint by 200 Kb.

    download sidplay

    PSP libsidplay Port

    Wednesday
    Nov 29,2006

    Ported libsidplay to the PSP. Also made an simple SDL based player which uses libsidplay. You will need current PSPSDK and SDL lib to build the lib and sample player. Enjoy the C64 Sound ;-)

    pic1

    download libsidplay

    download sdlsidplay

    Font2Texture

    Monday
    Nov 20,2006

    For a PSP project i need to convert a font to texture. Found a good working program here. But the current version seems to be not maintained anymore. So i did some bugfixes and made it compile against current WX Widget libs. Also i add a new feature that the fontface info is written to c source file, that can be used directly in your project.

    pic1

    Source

    PMP Converter Update

    Monday
    Mar 6,2006

    Little update for the PMP Converter Script:

    • Set bitrate via ‘-b’ swicth
    • Avoid upload to psp via ‘-n’ switch

    Encode video: python psp.py -m pmp -i file.mpg -b 600 -n

    Source