Category Archives: Embedded

AD9850 DDS Module part II

While cre­a­ting and veri­fy­ing the Eagle lib­rary which I wrote about ear­lier I found that my module rou­tes the main out­put, through a low­pass fil­ter, to pin 20 which is marked “ZOUT2”. The sig­nal source is actu­ally the chip pin 21, IOUT (not IOUTB). I find it a bit odd, but at least my module rou­tes its sig­nals that way.

Using my Eagle AD9850 module lib­rary I made a sche­ma­tic for a sig­nal source with a buf­fer amp­li­fier, and even though I have no plans on orde­ring a custom PCB I desig­ned a board for it too (manu­ally rou­ted). I often do that as it helps me find good ways to place the com­po­nents. Finally I used Black­Board Cir­cuit Desig­ner to plan the lay­out for a simple perf-board, try­ing to keep the sig­nal pat­h­ways as short as possible.

ant-analyzer-3-signal-gen-03-schant-analyzer-3-signal-gen-03-brd dds-02-composite-03

USB sound on Alix running Voyage

I thought that using a USB sound card with Linux would be easy, just plug and play, but I was wrong, it seems. Plug­ging in the Ter­ra­tec Aureon Dual USB (ID: 0ccd:0077) that I bought ren­de­red a pro­mi­sing out­put from dmesg and lsusb, and lsmod sho­wed that even rele­vant modu­les were loa­ded. The pro­blem was that mpd and other pro­grams did not find any way to actu­ally out­put sound to any device. They had the firm belief that my system was lac­king any sound card. Maybe I would need some sound rela­ted pac­ka­ges?

aptitude install alsa-base alsaplayer alsaplayer-text alsa-utils


No luck… The mpd con­fi­gu­ra­tion file /etc/mpd.conf see­med mostly con­fu­sing when it came to out­put devices, and the wiki page it refer­red to did not help eit­her. A search with Google on the USB ID was hel­p­ful though, as usual. Some­one with the alias BigRon also had pro­blems with Debian and this Ter­ra­tec USB sound card. The results from his attempts, docu­men­ted with ver­bose out­put, was simi­lar to mine. User bandan’s reply was the begin­ning of the end of my trouble! I had to edit /etc/modprobe.d/alsa-base.conf to com­ment out a line pre­ven­ting USB devices from becoming the first (default) device, sub­sti­tu­ting it for a line with the oppo­site effect.

## Keep snd-usb-audio from beeing loaded as first soundcard<br/> #options snd-usb-audio index=-2


# Fix from http://forum.doozan.com/read.php?2,4119,4166<br/>

  1. Allow snd-usb-audio to be loaded as first soundcard options snd-usb-audio index=0


    Now I was at least able to get alsa­mixer to ack­now­ledge the mere existence of a sound rela­ted device, but alas it chose an input only device (most likely my Logi­tech webcam with microp­hone) as the default device even though it cal­led the Ter­ra­tec one default by name. Luc­kily for me the just men­tio­ned forum thread linked to a more sub­stan­tial thread descri­bing the pro­blem in more depth. I added myself and the mpd user to the audio group, to make sure that there would not be any pro­blems with per­mis­sions regar­ding the devices

    addgroup jadler audio addgroup mpd audio


    I was still unable to play anyt­hing (wit­hout expli­citly cho­sing what Alsa refers to as sound card 1). So I kept try­ing the stuff that had worked for the per­son repor­ting in the forum, cre­a­ting an /etc/asound.conf file with basi­cally the same con­tent as sug­ges­ted in the last thread refer­red to above, but chan­ging all refe­rences to hw:0 to hw:1, and from card 0 to card 1. Now mplayer works, but I still can’t get mpd to do its thing.

Alix2d13 — Voyage Linux or Debian Live?

I am not sure whet­her it is cau­sed by the Ubuntu 10.10 amd64 run­ning on my work­sta­tion or on some bug in the Emde­bian pac­kage, but I do have a hard time to get Emde­bian instal­led. I have tried Mul­tistrap, Debootstrap, and Debian Instal­ler, and I have done it on the Alix com­pu­ter using PXE boot, on my work­sta­tion (follo­wed by chroot etc), and on vir­tual machi­nes using qemu/kvm or Vir­tu­al­box, but so far no luck.

All of this makes it less and less attemp­ting to actu­ally install any Emde­bian based Debian, and so I gradu­ally tur­ned back to Voyage Linux. When I was brow­sing the Voyage site I lear­ned about Debian Live, the system that “punkytse” uses to cre­ate the Voyage ima­ges, and also offers for down­load under tha name “Voyage SDK”. So now I am tes­ting Debian Live and try­ing to learn more about it.

The wiki and the manual seems to be a good place to start when lear­ning about Debian Live.

For those inte­res­ted in PC Engi­nes Alix the Alix forum may also be a good source of information.

(I should really find a bet­ter Word­Press theme, I know…)

Installing Linux on PC Engines Alix2d13 (part 2.5)

After publishing I rea­li­zed that I could have sup­plied more infor­ma­tion, and more down­lo­ads, than I did in my pre­vious post.

Here are links to pat­ched ver­sions of Debian netboot.tar.gz (stable/Squeeze, testing/Wheezy and daily build), all down­lo­a­ded and pat­ched today, 2011-05-10:


I have also made a diff file for the stable mod.

What my script does, basi­cally, is this:


  1. Untar the tar­ball and cd to debian-installer/i386/boot-screens/ where all changes are made.

  2. In the file syslinux.cfg (which is actu­ally a file with PXELINUX con­fi­gu­ra­tions) two lines are added:

    1. serial 0 38400—tel­ling PXELINUX to use ttyS0 for I/O (i.e. as console).

    2. con­sole 0—do not try to use any video console



  3. In the files adtxt.cfgrqtxt.cfg and txt.cfg sub­sti­tute any occu­rence of vga=788 for ttyS0,38400n8. This is done in order to tell the ker­nel that:

    1. There is no graphic/video console

    2. The con­sole that should be used is the first serial port, and with the spe­ci­fied settings.




This is a simp­li­fi­ca­tion, since my script also inclu­des a vari­able for the num­ber of the serial port, in case your con­sole is not on ttyS0. I have not inclu­ded any such con­ve­ni­ence regar­ding speed and other set­tings for the serial port chosen.

Installing Linux on PC Engines Alix2d13 (part 2)

I have found it to be quite nice to be able to boot the Alix board over the network using PXE. Using the Debian netboot.tar.gz tar­ball and TFTP I can boot the Debian Instal­ler or a rescue system, and the for­mer lets me install Debian Linux wit­hout phy­si­cally touching the CF.

In order to make net­boot use the serial port as con­sole I have pat­ched the Debian net­boot tar­ball, and I made a script that does all the patching, just for you… :-)

patch-netboot.sh

I have tested it with the Debian stable and tes­ting netboot.tar.gz down­lo­a­ded today and it works, and also with the daily snap­shot from Debian installer.

The script will modify the file syslinux.cfg in order to make PXE­Li­nux use the serial port, and the files adtxt.cfg, rqtxt.cfg and txt.cfg to make sure that the Linux ker­nel (actu­ally the Debian instal­ler in this case) also uses the serial port as con­sole. (Look at the script to see the actual changes. You should of course have a look at it before run­ning it, anyway.)

Making my anci­ent Net­gear WGT634U run­ning OpenWRT serve PXE ima­ges was really a no-brainer. In the Services/Dnsmasq page I ente­red the three cho­i­ces shown below, with  the pat­ched net­boot untar­red on a USB stick mounted on /mnt/sda2.

Refe­rences (other that links above):


Some more patching lets me use pre­see­ding too, but more on that anot­her time.