20080917

My Spore Creations

20080909

Make Your Own PIC Programmer



This is a very simple pic programmer thet you can make. Step-by-step instructions are available here

In my case it worked very smoothly, only problem arises is with programming software configuration.

That are very simple , it will make problem in Windows Vista.

First you have to set the Language to English in programming software (winpic800). Then you have to select Settings->Hardware and set jdm Programmer

Select correct device from Top right corner

All the other help is as per the site

Howto make a PCB in Home

Howto make a PCB in Home

It is simple, Toner Transfer method

Materials and equipments required

1. Ordinary Iron Box
2. hacksaw or hacksaw blade
3. low cost hand drill
4. Copper clad sheet (Glass epoxy is best for this method, if possible don't use paper phenolic )
5. Ferric Chloride (100 gm can be used for making 250 boards)
6. ART PAPER (Glossy paper available in office stationary store)
7. Plastic tray
8. Computer and Laser Printer ( Optional)

Steps

1. Make a fresh print out of your PCB layout in ART PAPER using a Laser Printer
(Transfer it as earlier with in 2 to 3 hours)
2. Clean the PCB with metal scrapper which is available Kitchen
( Cleaning is very critical, so clean it as shiny as possible)
3. Dry the PCB with a cotton waste
4. Power on the Iron Box with maximum heat setting
5. Place the art paper over the PCB copper side (make sure no air bubble )
6. Place the Iron Box over the PCB copper side for 3 to 5 Minutes , press and make a little move(depends on Heat)
7. Remove the Iron Box and put the PCB in to water
8. Sock it well and remove carefully the paper
9. Now you can see the toner stick in to the copper and paper layer can remove separately.
10. Sock and remove all part of paper (small portions of paper make short circuit)
11. make a solution with 10 to 25 gm of Ferric Chloride and 1/2 Lit water
12. Put the PCB in the solution and make to and fro motion until all part of the excess copper will remove.
13. Now Your PCB is Ready for drilling.

1mm holes are suitable for resisters, IC, diode etc

I have made lot of PCBs with this method.
Expense for making minimum setup is PCB (1'x1') - Rs.150($4) Hand Drill Rs.120($3)
Ferric Chloride(150 gm) - Rs.120($3) , Art paper, Hacksaw , Plastic Tray Rs.120($3)
TOTAL Approx. Rs.500 ($12)

20080908

PIC16F877A For Beginners

PIC16F877A is good for beginners, With almost all features which they need eg: i/o Ports, ADC, PWM, timers etc. In this blog I will tell you, how can you make a home setup for experimenting.

You need the following things

1. A computer with Serial Port and loaded with Windows98 or Windows XP (Old system is more better)

2. PIC16F877A ( only $5) or get it from microchip as sample

3. A 8Mhz or 20Mhz Cristal and 2Nos of 22pf or 33pf capacitors

4. One 7805 Regulator IC and a 9V Battery (See try to make a cheep power supply from old computers SMPS)

5. One breadboard

Now You can start

20080904

First Game - Flash Cards

Not so much a game, but imagine not having to look all over the floor for the lost cards, or ripped ones, slobbered on, etc.

A few years ago I made a simple program if you can call it that using Power Point.  Simply put it would roll through the letters of the alphabet, and also read the letter aloud.  It also included numbers, shapes, colors, animals, and other objects, and phonic sounds for the alphabet.

Now I have decided to learn computer programming, and Microsoft has a great tool set out called XNA that uses C#.  With this I am making this same program for Windows and the Xbox 360.

So far it is actually going well, I should have started with Pong, or "Hello World"...  But I like a challenge, and I like to learn as much as I can by myself, sometimes just with trial and error.  Over the next few days I will post the first screen shots, and soon I will share this program for beta testing with some of my friends that have kids so we can improve upon the ideas.

Hopefully in the end, it will be something that parents find useful.  While it will read the letters, we found it better to turn down the sound a bit and engage with our son while using the program.  It has fun colors, you can always find them, and it will always be in order!

You might have to worry about slobber on the controller or mouse though.

----

I started over with the code, here is what you can call an early alpha screenshot (or something).  All colors are just temporary, the font is temp, etc.



Working with the PixArt camera directly

This has been a pretty whirlwind past few months. Lots of things have happened, almost none of which procrastineering related which is why I haven't posted anything here. But, one of the things that I have poked at in the past few weeks was creating a PixArt to USB-HID device which allows the camera from the Wiimote to appear as a relatively easy to access USB device. This addresses several problems with using the Wiimote such as running off batteries for extended periods and flakey platform specific Bluetooth drivers. It's also possible to read from the Pixart cam at over 100Hz if you read directly via I2C as well as track visible dots once you remove the IR filter. Of course, none of this was discovered by me. All credit belongs to the numerous individuals who have contributed thier knowledge to the various Wiimote hacking websites. Normally, this project wouldn't be worth a post, but all the information on how to do this is pretty scattered and difficult to follow. So, I figured I would contribute by trying to making this all a bit clearer.

This project is fairly advanced. You must be comfortable with working with microcontrollers. Several simpler devices such as the Arduino or the Basic Stamp may work, but I used the 18F4550 PIC Microcontroller which provides built-in full-speed USB capabilites. But first, let talk about the PixArt camera:

Here's the pinout thanks to kako and a PCB picture. The Reset pin is active low, so use a pullup resistor to Vcc. The Wiimote runs the camera with a 25Mhz clock, but it also works with a 20Mhz clock so you might get away with fudging this a bit. The I2C communication is fast 400Khz and the slave device address is 0xB0. Most microcontroller development platforms should include I2C communication capabilities. If yours doesn't, get a better dev kit =o). Desoldering the camera can be hard with so many pins. But, careful use of a hot air gun will do the trick. The first part is to initialize the camera over I2C. Here's the pseudo code for initializing to maximum sensitivity (actual CCS C code in comments):

  1. write(hex): B0 30 01
  2. wait 100ms
  3. write(hex): B0 00 00 00 00 00 00 00 90 //sensitivity part 1
  4. wait 100ms
  5. write (hex): B0 07 00 41 //sensitivity part 2
  6. wait 100ms
  7. write(hex): B0 1A 40 00 //sensitivity part 3
  8. wait 100ms
  9. write(hex): B0 33 03 //sets the mode
  10. wait 100ms
  11. write(hex): B0 30 08
  12. wait 100ms

It's still somewhat mysterious to me what all these mean, but in this mess is the sensitivity and mode settings described at Wiibrew. The above code uses the sensitivity setting suggested by inio "00 00 00 00 00 00 90 00 41, 40 00" experssed in the 2nd, 3rd, and 4th message. The wait times are conservatively long. After you initialize, you can now read samples from it:

  1. write(hex): B0 37 //prepare for reading
  2. wait 25us
  3. write(hex): B1 //read request
  4. read 8 bytes
  5. wait 380us
  6. write(hex): B1 //read request
  7. read 4 bytes

This yeilds one sample from the camera containing 12 bytes, 3 for each of the 4 potential points. The format of the data will be the Extended Mode (X,Y, Y 2-msb, X 2-msb, Size 4-bits). The wait timings approximate what the Wiimote does. I've called this routine 1000 times per second without ill effect. Though, I doubt this is actually scanning the sensor and instead is just reporting the contents of an interal buffer. But, people claim 200Hz updates are possible. So, you can use that as a suggestion.

Hooking this up to your microcontroller is pretty straight forward. Give the camera 3.3v power using a voltage regulator, ground, a 20-25Mhz clock, and connect the SDA and SCL lines (don't forget your pull up resistors), and pull up the reset pin.

The CCS C Compiler for the PIC18F4550 includes USB-HID sample code. It's simply a matter of stuffing the data you got from the PixArt camera into the input report buffers for the USB. With this, you could actually create a USB mouse profile and make it control the cursor without any software or drivers at all. If set it up as a full speed device, it's possible to get 1ms reports providing extremely low latency updates. CCS provides relatively affordable PIC programmers as well. Explaining how to set all this up is not within the scope of this post, but it should be plenty to get you started. If you want to make a PCB, you can try ExpressPCB which can get you boards in-hand for as low as $60.

Update 9/6/08: Just a note about the clock. Since my PIC was using a 20Mhz resonator, I just piggy backed the Pixart clock pin off the OSC2/CLKO pin of the PIC which seemed to work fine. Also, Kako has more details (in Japanese) on doing this with an Arduino

Working with the PixArt camera directly

This has been a pretty whirlwind past few months. Lots of things have happened, almost none of which procrastineering related which is why I haven't posted anything here. But, one of the things that I have poked at in the past few weeks was creating a PixArt to USB-HID device which allows the camera from the Wiimote to appear as a relatively easy to access USB device. This addresses several problems with using the Wiimote such as running off batteries for extended periods and flakey platform specific Bluetooth drivers. It's also possible to read from the Pixart cam at over 100Hz if you read directly via I2C as well as track visible dots once you remove the IR filter. Of course, none of this was discovered by me. All credit belongs to the numerous individuals who have contributed thier knowledge to the various Wiimote hacking websites. Normally, this project wouldn't be worth a post, but all the information on how to do this is pretty scattered and difficult to follow. So, I figured I would contribute by trying to making this all a bit clearer.

This project is fairly advanced. You must be comfortable with working with microcontrollers. Several simpler devices such as the Arduino or the Basic Stamp may work, but I used the 18F4550 PIC Microcontroller which provides built-in full-speed USB capabilites. But first, let talk about the PixArt camera:

Here's the pinout thanks to kako and a PCB picture. The Reset pin is active low, so use a pullup resistor to Vcc. The Wiimote runs the camera with a 25Mhz clock, but it also works with a 20Mhz clock so you might get away with fudging this a bit. The I2C communication is fast 400Khz and the slave device address is 0xB0. Most microcontroller development platforms should include I2C communication capabilities. If yours doesn't, get a better dev kit =o). Desoldering the camera can be hard with so many pins. But, careful use of a hot air gun will do the trick. The first part is to initialize the camera over I2C. Here's the pseudo code for initializing to maximum sensitivity (actual CCS C code in comments):

  1. write(hex): B0 30 01
  2. wait 100ms
  3. write(hex): B0 00 00 00 00 00 00 00 90 //sensitivity part 1
  4. wait 100ms
  5. write (hex): B0 07 00 41 //sensitivity part 2
  6. wait 100ms
  7. write(hex): B0 1A 40 00 //sensitivity part 3
  8. wait 100ms
  9. write(hex): B0 33 03 //sets the mode
  10. wait 100ms
  11. write(hex): B0 30 08
  12. wait 100ms

It's still somewhat mysterious to me what all these mean, but in this mess is the sensitivity and mode settings described at Wiibrew. The above code uses the sensitivity setting suggested by inio "00 00 00 00 00 00 90 00 41, 40 00" experssed in the 2nd, 3rd, and 4th message. The wait times are conservatively long. After you initialize, you can now read samples from it:

  1. write(hex): B0 37 //prepare for reading
  2. wait 25us
  3. write(hex): B1 //read request
  4. read 8 bytes
  5. wait 380us
  6. write(hex): B1 //read request
  7. read 4 bytes

This yeilds one sample from the camera containing 12 bytes, 3 for each of the 4 potential points. The format of the data will be the Extended Mode (X,Y, Y 2-msb, X 2-msb, Size 4-bits). The wait timings approximate what the Wiimote does. I've called this routine 1000 times per second without ill effect. Though, I doubt this is actually scanning the sensor and instead is just reporting the contents of an interal buffer. But, people claim 200Hz updates are possible. So, you can use that as a suggestion.

Hooking this up to your microcontroller is pretty straight forward. Give the camera 3.3v power using a voltage regulator, ground, a 20-25Mhz clock, and connect the SDA and SCL lines (don't forget your pull up resistors), and pull up the reset pin.

The CCS C Compiler for the PIC18F4550 includes USB-HID sample code. It's simply a matter of stuffing the data you got from the PixArt camera into the input report buffers for the USB. With this, you could actually create a USB mouse profile and make it control the cursor without any software or drivers at all. If set it up as a full speed device, it's possible to get 1ms reports providing extremely low latency updates. CCS provides relatively affordable PIC programmers as well. Explaining how to set all this up is not within the scope of this post, but it should be plenty to get you started. If you want to make a PCB, you can try ExpressPCB which can get you boards in-hand for as low as $60.

Update 9/6/08: Just a note about the clock. Since my PIC was using a 20Mhz resonator, I just piggy backed the Pixart clock pin off the OSC2/CLKO pin of the PIC which seemed to work fine. Also, Kako has more details (in Japanese) on doing this with an Arduino

20080903

Alan Wake

As a fan of the upcoming PC/Xbox 360 game Alan Wake from Remedy Entertainment, I thought I would share a link to a great community website for the upcoming title.

Visit Bright Falls for more information on what is surely to be a great game, for those that don't know.  It is a psychological action thriller based in the fictional town of Bright Falls, Washington.  Alan Wake is a horror writer who battles insomnia, and the stories he writes are based on his nightmares.  Light will be a big factor in the game, as it can keep your nightmares away.  (think something like "I am Legend" to a degree).  For more information head to the FAQ by clicking here.  It has the most up to date info, the only people that know more are Remedy themselves...

Remedy is the same team that created Max Payne, and they always push the boundaries of computer entertainment and what we think is not possible on a computer with both graphics and game play.  Not to mention the wonderful writing of Sam Lake!



On a slight side note, still waiting on those new (office) screenshots Mr. Mäki!?!  ;)

20080902

Xbox 360 - Lower Prices

On September 5th, 2008 - the Xbox 360 will get a true price cut across all models.  The base Arcade will be much cheaper than a Wii as well.

360 Arcade will be -  $199.99 was $279.99
360 Pro with 60gb HDD - $299.99 was $349.99
360 Elite with 120gb HDD - $399.99 was $449.99

All models have HDMI, the elite comes with a cable as well.  You can also play these on your VGA monitor with an adapter, I found one used for $9.99 at GameStop.

While the Arcade does not come with a hard drive, it is still a good console for MCE duties, or for games like Lego Star Wars, Viva Pinata, etc.  It does have a memory card (256mb) for game saves, but do not expect to be able to download movies, tv shows, or large game demos.  Or sadly play older Xbox games, since the HDD is needed for the emulator files.

On a side note the 360 HDD's are finally getting a much needed price cut as well.

120GB HDD - $149.00 from $179.99

Well I guess no word on the 20gb or 60gb, I do not see them listed at Gamestop anymore.  Bummer since I am doing more with XNA I would like an HDD for my Arcade unit in the other room of the house.

---

Some great games are on the horizon as well.  Viva Pinata: Trouble in Paradise came out this week actually, and at a great price as far as current gen games go.  $39.99!!  Banjo and Kazooie: Nuts and Bolts which ships around 11/11/2008 will also be the same price.

Jensyn loves Viva Pinata, it is a safe game for the younger ones.  The only real violence is well you break pinatas open with a shovel (not required, but seems to happen anyway.  Give boy shovel, boy hits objects or shins with shovel), and they have candy inside them!  Very cruel actually, and sadly you can also witness this at your local park on most weekends.

Banjo looks interesting, you can build different fun vehicles that you can then use in the game.  They can fly, drive, float, bounce, and much more.  Looks fun, and I am sure it will be great for kids.  Again it is good to see Microsoft coming out with a lower price point on these games.  The first Viva Pinata was $59.99 at least I think that is what I paid.  Grrr!