Monday, November 23, 2009

Enabling Multiprocessor Support in Windows XP

My upgrade streak went something like this..486DX66, Pentium Pro200, Celeron300.. my last contraption had a Pentium "solo" core processor, clocked at 850 or so, as in an older book of radio engineering one would have it put, megacycles. All was well and happy I had been until one day I was sucked in to the World of War Craft 3.. open wide, eyeballing over my army moving as if it just had a touch of a smoky magic dragon. The arm race was on and I upgraded ferociously and swiftly.. of course I went an old school and put the next balls heater myself.. why did I do it myself, yes, I like pain.. that's very clear to me now.

I stuck in a multi-core rock, shiny copper heat exchange mother and RAM so cheap I cried. After giving it a kick it all light up as a x-mas tree and went on pumping. Thing were flying for a year or so, than I decided to see how all the 4 cores share the load and to my amazement I only could see one core working! It turned out that old XP installed on a single core didn't have necessary multi-core system files and worked as if my expensive 4 core processor was a single core Pentium. Good thing kind people figured it out before me:

http://incore.net/winxp-multicpu/

To test all cores are engaged open Windows Task Manager, it should show 4 heart beats..

Wednesday, September 30, 2009

USB "unplugged"

So I want to send a few bytes back and forward between a PeeCee and a "microCee" a microcontroller.
It used to be a serial port. You take a voltage level shifter such as for instance a venerable max232 (back in a day to reach further you just pump more voltage in to lines, these were the simpler times.. rs232 coming out of a PC somehow assumes 12 volt swings in the Tx/Rx) connect it to transmit receive pins on the microcontroller, and provided you have firmware handling the exchange, fire up hyperterminal (you see hyper was there way before v..) and if all went well see some garbled characters popping out in the hyperterminal window.. don't be alarmed, this is your micro is talking to you.. (maybe). All went well for a couple of good years until COM ports are all of a sudden are passe, archaic, not cool a word and hard to find on newer motherboards. Never surrender. My recent laptop has got 5 USB ports, I figure they must be good for something. Scavenging a landfill of 8 bit micros a few years ago I stumbled across the fact that it was quite a challenge to find a decent USB device performer out of the box. CYPRESS was a long and solid player in the USB field, for instance CY7C64xx series provided a full speed USB connectivity, but I remember back than I was a bit skeptic about my abilities to solder TQFP or QFN bricks. I also was somewhat unimpressed by the software toolchain, it was either expensive or a bit bigger "bang" for what I needed it for. FTDI had been and still there but it used to be mostly about COM to USB layer, plus all the logic if any had to be done on PC, FTDI chips would come functionally rigid and if anything you want to do outside the FTDI spec you'd need to couple the FTDI chip with a standalone controller and have software ready to do whatever you need it to do. I wanted, being lazy of course, a single chip solution without the extensive PC software dance around it. Moving along, AVR Atmega, love the architecture, love the developing toolchain.. but until recently no USB in their 8bit controller space. There was this "virtual" implementation of the USB in software (see here) but the lack of speed and the fact that it was not functionally up to the whole specification did keep me away. So here I was, delivered to the gates of PIC18F4550.. by Microchip. No, no I'm not complaining thanks to Microchip and their firmware examples for HID and CID type USB devices I managed to actually hear that illusive sound of a USB device getting picked up by Windows. But these days I'm not quite sure if I would stick with PIC18F4550 if I had a choice. I mean no disrespect but first of all there are finally AVR USB solutions available, second the 32 bit Cortex-M3 family from STMicroelectronics, STM32 is priced very competitively against any other 8,16 or 32 bit microcontrollers and provides extremely versatile toolchain and firmware support. So if I had to do it all over again, I'd go with STM32 but back than PIC184550 seemed to be a quite viable solution and I'm sure it still is for many.

Saturday, April 11, 2009

Some usefull embedded silicon..

PowerQUICC™ II Pro processor with higher CPU performance, added functionality, and faster interfaces MPC8313E
ST Microelectronics STM32F103 Micorocontroller, with the high-performance, high-speed 32-bit ARM Cortex M3 core processor, executing at 90 MIPS, 512k of high access speed Flash Program Memory. Excellent alternative to any PIC or AVR controller.
Philips LPC2119 Micorocontroller, which is based on the high-performance 16/32 bit ARM7TDMI-S CPU Core, 128kb Internal Flash Program Memory

MCF51AC: Flexis™ 32-bit ColdFire® V1 Microcontroller board
Xilinx Spartan-3E FPGA ready made boards in different configurations available from Digilent

Will update this list should anything else of interest pop up..

Tuesday, April 7, 2009

KXPS5 twists and turns..

So the story is like this.. i wanted to read SPI data from an accelerometer through USB. Simple enough? Not really, first I grabbed one of FTDI solutions, namely FT2232L. I quickly pieced together the following contraption..


and ventured to install FTDI driver and build a program out of a sample provided by FTDI website. Everything worked flawlessly, communication to and from the chip was taking place as expected. Outer I/O pins would light up as i wanted them to, that is until I decided to write and read a simple byte in the MPSSE mode. That is utilizing inbuilt SPI hardware support by the chip. I quickly realized that the API that is exposed by ftcspi.dll is quite clumsy for my purposes and wouldn't let me to fine tune and time the protocol as i needed. I'm yet to find a successful implementation of SPI to KXPS5 using FTDI hardware SPI solution. Of course there's always a bit bang mode where i could have software simulated the SPI but failing to launch the first time I kind of felt low pressure in the fuel pipelines to continue with FTDI. One day I saw a sample which would go something like this. SPI_PORT = byte; byte = SPI_PORT;.. I couldn't believe it was that easy to read and write to it. Of course it was a microcontroller.. yeah one of those things where code is still code, small and straight forward. I quickly (pic)ked up a microcontroller chip and build the next following contraption..


After fine tuning a few things, and putting a MCHPUSB bootloader from Microchip USB framework for PIC18 (so i can fine tune a PIC program till i drop) i fired it up, uploaded a program and saw read outs form the KXPS5.

It worked!

Next step, visualize!! I used XNA framework and the examples from Microsoft. I downloaded a free 3D model from TurboSquid spend some time debugging a few timing issues and the final result so far is like this. See it!! At least music is cool..;)

Monday, February 9, 2009

KXPS5 accelerometer, now and than..

I've been looking for a right accelerometer for more than a year. I did have this idea that it would be great to stack up these little guys against the gravi-force of our bubble and see the digits measuring the 3 dimensional tilt flicker on a screen. I went trough a number of choices. The venerable ADXL330 from Analogue Devices. Good, but..a bit pricey and requires 3 analogue to digital input, if having more than 3 connected might ran out of AIN inputs.Than of course STMicroelectronics LIS3LV02DQ this one pumps data trough SPI. I like, but.. still pricey.
Than there is Freescale Semiconductor MMA7455L good one, digital SPI or I2C all bells and whistles in order, and this one would've been my chose providing it only costs around 5 dollars on digikey but wait.. crawling over ebay, totally spaced out as usual, i came across this. Behold KXPS5 series accelerometers by Kionix. And wait there's more, there's a savior out there helping people to get acquainted with this technology at a very reasonable price his ebay tag is crodnet and the page on the web crodnet.co.uk.. unfortunately at the time of writing the page seems to be inaccessible, but i hope it should be an easy fix. So there.. the package of the unit is not friendly, it is LGA14 and 0.8 mm thin.. some fear and ran when see. But, wait.. it is not that bad.. have a look at the pictures.. all done by somewhat steady hand.


Using low melt, non clean solder and very fine tip of a ESD safe soldering iron at a controlled temperature point. (I personally use AOYUE 937).. but wait, there's more you can even mount it on a PCB..


again, all hand made using presensitized boards and a scaled down transparency. Than you put some solder, flux and than you bake.. more about it next blog entry.

Sunday, January 25, 2009

Cheese!!!

Often you find yourself bouncing off a fridge back to a stove back to the fridge... open look inside.. yogurt, frozen semi prepared bricks of heavily processed space food, what IS it? Ah, its a dead bird frozen in space-time iced cube, no turning back, blue slopes of shaved skin goosebumps.. no appetite you say? Wrong! Have a go here:

RUSSIAN TABLE


this is a jump you can and should afford, this will remind you the time you heard stereo.. ah.. not that old? Ok how about this, it will remind you the first time you heard 12.1 3D sound penetrating the depth of your inner ear while comfortably floating in a null-graviton chair looking at a holographic projection of Connan the Barbarian. Wait a minute, this is not 2035.. well you got the idea, at least try this food, hope you will not be disappointed.

Tuesday, January 13, 2009

X-Ray dissasembling manual or a part 2..

So, you're happened to be inspired by a home build radiation emitting device and quickly slap one together connecting thick, high voltage, glowing red carbon wires to a post world war tube rectifier engulfed in to an aluminium foil. Your eyes are shining your palms are shaking.. quickly plug it in, plug it in.. not so fast. Step away from the contraption and listen here carefully. X-rays are a form of electromagnetic radiation. Light is a form of such radiation, as well as radio-waves are, the difference is been in the frequency of these waves oscillation. When dealing with radio-waves we are talking about 1.50E5-1.2E10 Hz or approximately 500 meters to 10 centimeters in wavelength. When looking at light we absorb somewhat in between infrared to ultraviolet frequency in range of 1E12 to 1E16 Hz, this is approximately in range of 1 millimeter to 7 nanometers of a wavelength. This covers not just visible spectrum but some of what we rather can feel radiation, it includes infrared (immediate burn sensation) and ultraviolet (not so immediate but more severe burn sensation). What was found and than theoretically tied up to mathematical derivations is that the higher the frequency the more energy is packed in a single quanta of such radiation also known as photon (Max Planck). X-Rays, which in the frequency spectrum positioned well above the ultra violet radiation gulping up some 1E17 to 1E19 Hz range, in fact are a bunch of quite energetic photons, racing with the speed of light, each carry a pack of energy which when absorbed on collision is capable of inflicting living tissue atoms ionisation. Lets go slow here, in our made up universe atoms consist of a positively charged nuclei surrounded by negatively charged electrons. The electrons are bonded to the nuclei by electromagnetic force. This force is by power of 3 stronger than the gravitational force, so strong the force is that it binds together materials such as for example tungsten carbide or say one of the toughest material on earth aggregated diamond nanorods. And yet this force is not infinite in its wisdom and can be broken. In fact you do it every day, say by ripping off paper for instance. Wow, call me simple, X-Ray! Well not quite. In the case of ionisation it goes deeper than a simple crack in the material. You see when you tear a material apart it brakes the bonds between molecules, bonds that are formed due to an uneven charge distribution within a molecule itself. (more on it some time later, when your head stops hurting). This does not destroy the molecules it just separates them apart. On the other hand when a photon is absorbed by an atom it energises an electron that oscillates around atoms nuclei and possibly makes such electron jump to a higher energy level or even become so exited that it abandons its nuclei to wonder off leaving the atom "broken" or ionised. If enough atoms are broken the whole chemical composition of made up by these atoms molecules changes. This in turn, for example, can upset a superfine balance inside building blocks of living tissues, proteins. And than instead of you, proteins are starting coming together in a form of little Frankensteins and that's my friends is very little fun. So there.. go drink cold beer and leave X-Ray machines to professionals.

Monday, January 12, 2009

Dream on..

A few computer games, I vividly remember enjoying, did not have a powerful 3d engine. Majority of them didn't have the 3d engine at all. I attribute it to "it is always best imagined rather than seen" factor. May be we are in denial about the actuality of our existence? Is our imagination a happy place where we escape from mundane reality? Cutting a blubber of this innuendo short. If you're getting a kick by looking at a little man made from x and 0 sliding, as if ruining, across ==== floor and if you are as asphyxiated in the head as I am have a go at this game, the Ragdoll Cannon and have your otherwise used to better the world hours burn. (By the way, Ragdoll Cannon has nothing to do with an xo man running ==== floor, go figure..)

Thursday, January 8, 2009

X-Ray, call me simple "Death"-Ray

So.. you sit there spaced out, bored.. what to do.. what to do.. oh, i know, how about building an X-Ray machine!! That should be fun, fun, fun!! Now before you read any further.. get it in to your brain, it is dangerous, it brings lots of problems to you, your neighbours, pets and surrounding bacteria.. it involves parts and subatomic particles which guess what? Can kill you! One of them slow, some of them can fry you pretty fast.. So if you are yearning for a healthy dose of radiation better sign up for a regular check up at your nearest dentist office..

But, nevertheless.. nevertheless.. you might be somewhat surprised, as I initially was, that you can build a pretty solid X-Ray emitting device right there, in the convenience of your house. All parts can be fabricated or readily acquired from various suppliers and even more, the actual "how to" has been available to us, mere mortals, for some 40 years or so. First published in The Scientific American Book of Projects for The Amateur Scientist circa 1960, its been widely disseminated all over the Internet. The question remains though, has anybody out there was brave enough to reconstruct the device and test it? So what do you need to build this monster? You need a high voltage source, we are talking 35-65 kilo volts. In the article the voltage is generated by a vibrator (don't get me started..) a capacitor and a charged-discharge coil.. i say we are step up from 1960, these days you can get high voltage in a bit more efficient way.. no, your microwave transformer in its almighty power will not cut it, it only produces 2-5kv.. you need 10 times as much, what will do is a fly back transformer together with its glue logic. It's normally found inside CRT TVs or computer monitors. Expect those available in large numbers all over the country at the dump near you, as soon as we switch to digital over the air transmissions. Or you can get one already made and mailed to you from, say Information Unlimited or United Nuclear HV power supply. By the way if you happened to be short of an X-ray emitting vacuum tube United Nuclear X-Ray Tube has one of those together with the blocks of lead. Which you have to amass in big numbers to surround yourselves and your loved ones with should you decide to seat out a "nuclear winter".

Having said that, I once again, would like to remind you that having your portable x-ray machine is dangerous. Don't run to me crying saying that you got a bo-bo growing inside your head the size of a tennis ball. I have nothing to do with it, you have been warn. Also if you stick your fingers in to a power point it is equally bad, just to make sure you know this one as well.

Wednesday, January 7, 2009

LPC32x0 ARM9 for less than 15 bucks..

15 dollars, that's how much you need to get from fiddling with PICs and AVRs little uCU's to start forging a "real" character out of yourself. I mean in the nerdy kind of way, it will not get you a lap dance, I'm sorry, not in the area where I live anyway, but it will get you a full blown ARM9 core microprocessor with all bells and whistles you ever need to get your favorite LED switching on and off a few times. The plastic thin fine-pitch ball grid array package core runs at "hot" 266 MHz and houses up to 256MB of RAM, USB On-The-Go, floating point inbuilt coprocessor, DDR SDRAM and LCD controller with a touch screen option running up to 1024x768 pixels..(i know, i know.. i should "get a life"..). This is just a tip of the iceberg. Dive on your own here LPC32x0 Data Sheet (don't forget to wear 5mm thermal and grab a re-breather, expect to spend more than 40 minutes at depth you never thought possible..)

Yes, it is a "dreaded" ball grid.. and it's got 296 balls, pitched at .8 mm. That is way more than I've got. But fear not comrades, it is not the quantity it is the "size" that matters (don't believe anyone who tells you otherwise, they are lying either to you or to themselves..). I will see if I can come back to you on how to handle these at home. (Shmartboards are out for now, their smallest pitch for BGA is 1mm).. until than, see if you can keep your stretch out hand steady long enough without having a constant "refill".


Tuesday, January 6, 2009

Was is DASD...

DASD is a direct access storage device. The term crept up from prehistoric times of ancient number cranking machines.. young people never knew, older people already forgot most probably due to immense brain bomb explosions, some of us call those a C++ language. If you understood nothing, have no fear, it was meant to be.. kick back and see more appearing here. Expect stuff along the lines of microelectronics, cars, engines and how to do most of it yourself, hence avoiding labor charges.

See you more and see you soon.