Archive for the ‘General’ category

New toy!

March 24, 2010

Today i got something special in the mail. A cute little XK-1 development board and a XTAG2 debuger to go with it. I won this thing on the xcore exchange forums as part of the activity points based giveaway.

So what is this board. Its heart is theĀ  XS1-L1A chip, that is a single core 400MIPS processor with 8 threads and 64K of memory. Along on the board there are 4 LEDs and 2 pushbuttons that are wired to the I/O pins. There are also two expansion headers that bring out the I/O and power supply. The main feature of the board is the connector on the other side of the programmer. It allows multiple boards to be stacked together to connect over xlinks and share power. This way you can expand the system with ease.

Sound Card PCB

December 17, 2009

Okey so enough of PWM for audio, its time to get serious ! So i fired up Altium again and went on designing a proper sound card for the XC-2, and quite a sound card it is with its capabilitys reaching up to 192Khz at 24Bit. Still while packing a punch it remains quite tiny at 25x40mm only and half of the room are the big 3.5mm jacks. There is also a small 8 pin oscillator on the board that provides the necessary clocking to the DAC/ADC chip. The thing can be configured over SPI, I2C or hardwired setting on power up. I2C is also used to change the system clock if needed as the oscillator has a I2C port.

Only downside of it is meaby that the line out on it dose not have much current capability so its not built to drive headphones directly.But in any case it should provide top quality audio when it gets built(Well i hope it works when i build it…)

WAV Player video demo

December 12, 2009

So i made a little video showing the wav player in action.I polished out the code a bit and added a LCD to show some info.

Project source code: Link…

SD Cards and wave files

December 9, 2009

Remember that SD Slot i made last time? Well i actually put it to use and interfaced those cards to my XC-2.

Okey so how about doing something neat with it? How about playing *.wav audio files from the card. But how do you get a analog audio signal out of a XC-2, well i went for the quickest and simplest way of doing that. Its PWM going trough a RC low pass filter and out to a audio jack trough a dc blocking cap. Its not really the best DAC in the world but it works quite good actually. So all i needed then is a buffer to keep feeding the PWM generator with data at exactly the right speed to match the wav files sample rate.

DAC sawtooth test:

Hello LCD

December 5, 2009

I went with doing something simple for a start and decided a LCD could be pretty useful, so i made it interface a simple 2X16 character LCD module. Something amazing happened too, the display shown up the text the 1st time i ran my code! Woah! Things tend to never work on the 1st try as there is always something that gets overlooked, but this cute little display must like me.

The code still needs a little work to make it easier to use and gota make a channel server/client so i can use it as a nice debug screen.Also need to get in some USART too, so i can have a terminal window (Yeah i love those for debug).

Some Hardware

December 3, 2009

So after some time i started a bit on hardware to plug on to the development board.

First thing i did was solder some header connectors on to my XC-2 as the board comes with no connectors to allow you to use the connector of your choice. I just used female headers on the bottom of the board. I put then there because i found that the ethernet jack on the top is too tall to allow board stacking with standard headers while there are no problems on the bottom.

A simple thing i that came to my mind was a SD card interface. Hmm i don’t have a SD card slot to use on it, so the better way of doing things. DIY it! This is a SD card slot built out of a small piece of prefboard and a few header pins and coper wire. I made one of those before when i needed a SD slot when interfacing a dsPIC to it(it ended up very reliable too).So all i did was make a copy of that one and put a two row header to plug in to the XC-2 board. Next time you need a SD slot fast, just grab a little prefboard and some header pins.

The 2nd thing in the photo is the mess of wires that can be used to connect pins of a connector on the XC-2 to a breadboard for quick testing of a piece of hardware on it. It might come very useful to do some quick stuff on it.

I didn’t start on the software for this stuff yet tho. I hope to get some done soon.

TCP/IP getting there

October 28, 2009

winsock_firstsitePhew after some work i finally crunched together a winsock like API for the TCP/IP stack. This is the fist website served by the API ran by a simple 10 or so lines of webserver code. The API is still far from perfect but this proves that the thing actually works. I will finish it as soon as possible so i can start playing with different things.

The API provides the easy to use basic calls to interface the TCP/IP stack, it also takes care of buffering, retransmission etc. It may not be the most efficent but it gets the job done and dose it with little code.