Monday, December 11, 2006

Oct-Nov-Dec Hardware projects summary

It's been an interesting two months in regards of hardware projects. I familiarised myself with the antique AT89C2051 and BASCOM, I really like the simplicity. While this micro may be old, I find it fun to work with. This was the one microcontroller that I built 5 programmers for, none of which worked. My latest try, an old version of Peter Averill's TAFE programmer did the trick however so now I am fully capable of programming them. Good thing too because I have about 5 lying around doing nothing. After finishing a 4 year old project I never managed to finish because of the lack of a programmer I built a POV device with ported and improved code from a POV example.


I later found out that that particular type of SMD led had an integrated resistor so adding the resistors was really pointless. (Not sure now..)

The code in BASCOM-8051, It's currently displaying my name, alter as needed.

The project I finished was actually linked to the previous article. It's the PS/2->Newton Serial Keyboard converter from here.

Works as expected with the improved version of the code. The Linux driver also works after significant modifications

(I haven't updated the link in the previous post yet but I doubt anyone wants it and i'm lazy so leave a comment if you want the working version)


Onward, I've just finished duplicating a significant project that can be found here. It's the AVR Signal Generator, mostly because I had a 2x16character LCD lying around doing absolutely nothing. I haven't finished it yet but. I can now verify that it's working properly.

I've also revamped the MIDI keyboard driver I've built quite some time ago. The project is from this site. The PCB was badly damaged due to overheating, bad PCB quality and a use of a chemical soldering liquid which made additional soldering to the board borderline impossible(thus the overheating) However now it is completely functional again.

Wednesday, November 1, 2006

ZipIt NFS Jukebox files

Here it is. New file, should fix problems. (I hope this is GPL compliant, edited portions of code are supplied in the archive.)
Okay so, this SHOULD work on ANY ZipIt with a linux image that has the ZipIt audio drivers(wm8751l.o,ep7212_audiodma.o,zipitaudio.o) and can mount NFS as everything besides playmp3 is static linked and I included working libs for playmp3.
Just unpack the file to the root of an NFS share and mount that to /mnt on the zipit (mount -t nfs -o nolock,tcp,intr ip:shared_dir /mnt)
then type
/mnt/p
and relief should start up. Put your mp3s and FLACs on that NFS share and you're good to go :)

Notes:
ffmpeg suffers from a reported bug with FLAC files that hasn't been fixed yet. for me this meant that it couldn't play 1 file from about 30. YMMV, until it's fixed recoding with a different version of flac should help.

if flac files don't play(like.. at all) you probably don't have write access to /dev, just delete /dev/mouse if you have one then cp /dev/null /dev/mouse, plus delete /dev/dsp and mknod /dev/dsp c 245 4 manually and it should work.

if flacs play and mp3s don't and you don't have /dev/zipaudio replace /dev/zipaudio with /dev/dsp in /mnt/players/mp3play (with any text editor)

I modified playmp3 to load stuff from /mnt (/lib/ld-linux.so.2 -> /mnt/ld-linux.so and libc.so.6 -> /mnt/c.so) so if you want to integrate playmp3 into your mmc filesystem or anything get the original version from a few entries back (Zipit Modding entry, too lazy to link) and place the .so files (renamed to their original filenames) into your lib dir.

When in the file browser don't press enter on files, press a to add a file or shift+a to add all supported files in the directory.

Kill the battery monitor loop, I don't have it in my mmc init scripts and I just noticed when I tried without an mmc card that it produces skips whenever it refreshes. if you have it running do kill -STOP [pid of loop_batlvl] and kill [pid of sleep 60] before running relief

Good luck :)

Monday, October 30, 2006

ZipIt, the WiFi music player

Here's what I've been fooling around with today.I wanted to turn the zipit into a music player since I got the first one but for reasons I've already detailed in another blog entry it will never make a good standalone music player, however it makes a great wireless network jukebox.

I modded and compiled Relief which is a text-mode file browser, playlist manager and music player frontend, and now have it running fine on the zipit.

So why not MOC, cplay, ? Well I've been looking for frontends for a while now but besides cplay and MOC I couldn't really find anything worth mentioning. I didn't want to use cplay because it needs python and MOC would've needed tremendous rework. Relief is simple, small and does what it's supposed to.

As for the players, I'm using the Cirrus decoder for mp3s (of course) and a modified version of ffplay for FLACs.

I've tested with 320kbit/sec MP3 and random FLAC files, they play fine from NFS without a single skip or stutter.

I couldn't get OGGs to work with ffplay but didn't really bother either as I don't use OGG. As for Musepack it's too much for the CPU (libmpcdec is anyway, 15 seconds decompression for 2 seconds audio...)

Thursday, October 19, 2006

ViewML on the ZipIt

First I should probably mention that I only compiled Pixil which is just the graphical environment you see here, the whole idea of Linux on the ZipIt started here the place to get most information about it is the eLinux wiki and I'm using a slightly modded version of Stephanie's linux flash image (the server's running on her ZipIt) I didn't have anything to do with the linux part (besides adding an already existing pivot_root script to an already existing flash image :-)

I've managed to produce a buildroot that's uClibc is close enough to the one in Stephanie's image, so I can use dynamic linking now without stuff instasegfaulting.

I've managed to compile ViewML, Pixil's browser.. found some patches to get the source compiling with newer gcc versions but it's really ugly still, not to mention unstable. (an older libwww might solve that but it would be better to fix it and keep the new one :-) I've recompiled nano-X with libjpeg libpng libtiff and freetype2(didn't set that one up to work yet though)

Positive sideeffect of having a compatible buildroot is that Pixil screentop widgets (backlight and battery meter) and the Sysconfig's config pages work fine now as seen below. Well okay the backlight thing and the battery meter doesn't actually work but at least they start up and are visible. And the sysconfig pages don't really like 320x240 (problem not apparent on the one below)

ViewML can be controlled from the keyboard to some extent.. You can't actually open links you'd need a softmouse driver for that but you can scroll around and enter new addresses. Now forms appear to cause some problems and it segfaults if you try to submit them so that needs some serious fixing.

Images (even really large ones) show up fine, tables are rendered correctly as well, and while it's no Gecko it beats using lynx or the PalmOS4 browser. However it takes 30 seconds or possibly more to render some sites.

So I decided to try it out live and briged the wifi stick's connection with the server's.

Submitting the query from the google mainpage generates a segfault but if I open the url directly the result page shows up fine.. Oh and I've decided to try and take a few pictures of the screen again.

and the picture below shows why a softmouse driver is needed

Tuesday, October 17, 2006

Pixil on the ZipIt

Okay so I've been playing around with Pixil which is like a syncable PDA operating system running on linux, and of course I wanted to compile it for the ZipIt.

First I had to get nano-X working correctly, there was a patch but that actually made things worse(screen corruption), ended up disabling the ZIPIT_TRANSLATION driver it added. Tried the INVERT4BPP driver which also appeared to cause some glitches so in the end I tried the SA1100_LCD_LTLEND driver and ran lcdpal 0 after the nano-X server Pixil WM started up, it worked perfectly.

I also compiled in SERMOUSE support, and connected a serial mouse through a max232 as I noticed in prior tests that Pixil is pretty much useless without a mouse :/

I was also having problems taking good pictures of this screen (this one's the one I did the crappy backlight mod on and I still have no inverter for it)


so I coded up a quick tool to convert 4bpp raw bitmap data directly from the framebuffer (cat /dev/fb0 >file) to 8bpp raw bitmap data (exe, source) which can already be opened and converted with Irfanview.


The outcome: Pixil on the Zipit (altough with an old serial mouse hooked up)





UPDATE:

Fixed them :-) Couple of things don't work (that includes the web browser sadly that doesn't even compile) but the basic PDA functions work fine. Games on the other hand do not. Neither does anything that uses dynamic libraries (but that's probably a problem with my buildroot which I am too lazy to look into)










the OSK is kinda broken.. the keys get a bit wonky after pressing, the scribble tool works fine though (yeah.. neither is of any use on the ZipIt)

Friday, October 13, 2006

Zipit Modding Cleaner, Faster, Stronger

Got two more ZipIts off ebay, one for an average price slightly used, the other broken (in great condition though) I opened the broken one up and quickly diagnosed the problems, firstly the 3.3volt stepdown was burnt, still having a free sample from Linear tech I replaced it and the zipit started up, I noticed that it didn't charge the battery so the next step was replacing the LiIon charger ic (gotta love free samples)


and I had a completely functional ZipIt. Learning from past mistakes I decided on a few things.I wanted from modding this.

Firstly I really didn't want to worry about the stability of the MMC socket mount so I decided to use 5 minute epoxy but not wanting to rely just on glue I also applied a bit of sulphuric acid and soldered the socket onto the RF shield.


I can pretty much trust it now without worries.

Secondly I wanted to do the MMC mod's "soldering to resistors thing" only ONCE and I wanted to forget about it afterward.

So I used better wiring than last time and a blob of transparent 5 minute epoxy instead of hot glue to secure it


and last but not least I wanted the slit that I had to cut out from the casing to "just fit" without the tremendous amount of excess that I cut out last time.

and for the sake of keeping it clean I didn't do a serial port mod. I also didn't commit the mistake of dismantling the screen to do the backlight mod. That turned out horrendously last time.


I'm really satisfied with this one

Thursday, September 7, 2006

JuiceBox Modding

Well I got one of these off ebay.

Just for fun really, it plays 128kbit mp3s but nothing more (I think later models do more?). I might give it to parents for xmas or something loaded with a couple of albums.

Also makes for a nice (well not really, the display is really crappy) digital pictureframe if you're into stuff like that.


My order of 5 SD sockets arrived and I was bored. Found a piece of mylar cable that accidentally had the same pin spacing as a juiceware cart that wasn't included and ...


From left to right, piece of an old phonecard to hold the mylar cable in place, the mylar cable, some regular wires, an sd socket and a 32 meg SD card. Perfect

Will make a cleaner SD adapter inside a real juiceware cart later when it arrives from the other end of the world.

UPDATE 09/02


Hooked it up to JTAG and serial :-)


Ran some demos


And since I was stupid enough to destroy the juiceware cart I ordered before dumping it's contents that's about it for now. Would also need the program flash code to do the xD card mod, and that hasn't been released yet.


UPDATE 09/05


Coding, coding. Managed to learn some aspects of this cpu and embedded development as a whole. Managed to set up the LCD in 4096 color mode and modify the example font drawing code that was released on the elinux Wiki to work with the 12bpp framebuffer (not perfectly yet though..) Also managed to set up the serial port for receiving (rx didn't work in the example code) and now I have something running that prints out stuff I send it through the serial port.

Tuesday, September 5, 2006

ZipIt Modding

Well I received my Zipit and broke it shortly after. An adapter rated at 4.5 volts was outputing 8.2 and that fried the stepdown pretty quick, ended up having to remove it.

Lucikly there was a repair guide available and I could make sure that the rest of the unit was undamanged. I went and ordered free samples of both the 3.3v Stepdown and the Li-Ion charger IC (which I didn't need thankfully) from Linear Technology (linear.com). A week later they arrived in shiny antistat ziplock bags

After replacing the StepDown the unit worked perfectly so I went and did the serial port and mmc mods almost losing my remaining sanity in the process. (had to redo it twice because the wires got ripped off) The serial mod: (these turned out really horrible, see the clean mod :)


and the MMC mod:

Using Steph's idea of where to mount the mmc socket and her rom image I have a working unit.

Sadly the audio apps don't work yet. The CPU has enough horsepower but for some reason the audio skips anyway. I have no idea why yet but it might have something to do with the audio drivers.


UPDATE 08/24


It's partly the fault of the slow MMC/SD Interface. And possibly because reads take up too much of the cpu. Eitherways one thing is 100% sure.. if the data is in memory.. it'll play. It'll play 320kbit CBR mp3s flawlessly as long as they fit in memory. Manipulating /proc/sys/vm/min-readahead and max-readahead (like setting them to a very high number like 3000 - 10000) can make linux pull the whole file up into ram and after that playmp3 from Cirrus (this is Cirrus's optimized decoder which probably uses the Maverick unit on the cpu as well) will play them without a single skip most of the time (always if played in sequence uninterrupted) However I tried with a bigger file that couldn't possibly fit in memory and it just segfaulted. And the initial read takes quite a few seconds. Not really a feasible jukebox but if you're desperate it works. I never could get FLAC decoders to work right. When there's data to be read it just starts skipping wildly, and FLAC files are too big to fit in ram so unless somsone codes an efficient slow-media optimised buffer handler for mplayer or ffmpeg it's not going to play well, and forget about the "genuine" flac library from the flac project. 100% cpu while decoding to devnull as opposed to 50% with the ffmpeg implementation. What else.. modplugplay doesn't work.. reason unknown skips like me in my last year @ HS. no mmc reads involved tho. cpu usage at 32%.. NO idea why it skips (no kswapd/kupdated activity either) I'll try to find a module player that works.

What else.. oh yes I compiled mc, who can live without mc right? It's quite nice but the initial setup is a pain. getting into the menu for example.. but after modifying some key bindings it works great. Can't get it to use mc.ext yet though for some strange reason.



I'll have some binaries up sometime, maybe...


UPDATE 08/24 x2


Compiled MikMod. It plays smaller modules fine but bigger XMs make it skip. Had to do a little hacking in libmikmod to get it running. Basically just turned the stdout driver into one that writes to /dev/zipaudio because I got horrible desyncs with the OSS driver (buffering issues again?)



HURRAY! BINARIES! Here's mc, yafc(ftp client) and whoops, no mikmod. Reason: The above two were direct compiles from source, so please see respective project pages for source, but I did indeed modify mikmod, so I don't think I can release that without a source release(though I might just not know GPL good enough).. and I don't have that anymore.

Just make sure you "export TERM=linux" before running these and put this into "/root/.mc" to get F9 as ALT(the ... key, not the Alt key)+UP, F3 as ALT+LEFT, F4 as ALT+RIGHT and F1 as ALT+DOWN (or alternatively find the source of chgscancodes and link other keys. Until that happens this works) You might also want to start mc with -b for monochrome mode, and set the monochrome skin in mikmod.

Sunday, April 16, 2006

Homemade PLCC32->DIP32 converter

The text for this was lost.. But it's still a good thing, so I decided to repost it. It allows you to turn a really old and crappy Pentium II pc into something that flashes PLCC32 as well as DIP32 Flash EEPROMs. Consider using Uniflash with this. These can be bought online from random stores for $25+ so It's worth making your own if you need one. Get the board layout as a huge jpeg OR download the Eagle board file (3.55r3)

The outcome will(should) look something like this


Friday, January 20, 2006

Cornice Dragon dissected

I bought a usb data store with a broken microdrive for 10 bucks. I wasn't sure about hdd being broken in it but I thought it's worth 10 bucks even if it is. It was kind of beyond repair (didn't spin the disc up, just clicking) so I took it apart. Thought I'd put some piccies up.


This is what the microdrive originally looks like:




and here's mine without the stickers:



and the underside




NO screws need to be unscrewed for disassembly, in fact the two lower screws hold the head so you especially don't want to mess with those. Only thing needed is to remove the stickers and bend these little pegs out:



Then the top cover and the hdd can be separated like so:





Damn thing is small :-)