Step 7: PIC Morse Code

PIC microcontrolers are programed in assembly and can be a bit tricky to learn. I don't really have the time to show you the ins and outs of programing PICs, but I can start you off with a little Morse code program I wrote for the Wii release. You'll need to program the chips before you solder them into the circuit becasue the programing lines are going to be used by the card.

To send a Morse code string use the subroutines "S" for a dot, "L" for a dash, "CS" for a letter separator, and "WS" for a word space.

The sleep command will keep the PIC in a low power state until the button is pressed on the card. Just before sending the PIC to sleep I read the status of the port into the "sandbox" register so that the chip would know how the button changed.

The following code was written for the PIC10F202.

start	init	movlw	b'00010101'			; Configure options (weak pull-up, wake on change)	option 	movlw	0x00				; Future button variable	movwf	state	movlw	0x08				; Set GP0-2 to outputs	tris	GPIOWii	call	S					;WII	call	L	call	L	call	CS	call	S	call	S	call	CS	call	S	call	S	call	WS	call	S					;FOR	call	S	call	L	call	S	call	CS	call	L	call	L	call	L	call	CS	call	S	call	L	call	S	call	WS	call	L					;THE	call	CS	call	S	call	S	call	S	call	S	call	CS	call	S	call	WS		call	S					;WIN	call	L	call	L	call	CS	call	S	call	S	call	CS	call	L	call	S	call	WS	movf	GPIO, W				;Check GPIO for Sleep	nop			sleep	goto	Wii;-------Subs-----------L							; Dash	bcf		GPIO, 0	call	Delay	call	Delay	call	Delay	bsf		GPIO, 0	call	Delay	returnS							; Dot	bcf		GPIO, 0	call	Delay	bsf		GPIO, 0	call	Delay	returnCS							; Space between letters	call	Delay	call	Delay	returnWS							; Space between words	call	Delay	call	Delay	call	Delay	call	Delay	return;------Delays-----------Delay			;199993 cycles	movlw	0x3E	movwf	d1	movlw	0x9D	movwf	d2Delay_0	decfsz	d1, f	goto	$+2	decfsz	d2, f	goto	Delay_0			;3 cycles	goto	$+1	nop			;4 cycles (including call)	return	END                       ; directive 'end of program'
wow! I received a Wii points card code and I can't believe it actually worked! They're giving them away here http://linkbitty.com/qycYz
why not just spraypaint the back white?
can some one tell me how i can get one PLEASE
Target stopped producing these once the Wii was released a few years ago.<br><br>Keep an eye out for some of the other crazy gift cards they make, I don't think they have anything electronic right now. Nevertheless they are pretty creative in the gifting department.
i want to know too...
I am from England, I have ordered a bag from brandbagsales.com. When I receive the product. I find it is not the color I like.They change the bag for me immediately for free. The service is very good.
If it's a gift card, why would you want to scratch off the bar code?
No... He used Gimp and Blurred it so nobody would try and use it, because it is possible to reactivate a used gift card and track someone with it.
maybe he used it all ready like if it's empty
wot is the point of this?
the point is to change the color on a gift card and make it seem complimicated.
do they still sell em
They stopped selling the wii ones a while back, but they just started selling Blu-Ray giftcards which are exactly the same. (I guess they just had blank ones and printed Blu-ray instead of Wii on them.
wow the pictures are...awesome they look soo professional
So.. What does it <strong>do</strong>? As far as I can tell, you took apart a card, changed the lights, and did something with Morse Code.<br/>
Funny comment; 'morse code' Besides that; what a cool giftcard. Looks neat :]
I cant find them anymore. I have a wii but noo gift card
This gives me an idea, but I'm not too circuit savvy.<br/>What would I need to solder in to allow this to run from a 12v source?<br/>If you're wondering where I'm going with this, look at --&gt; <a rel="nofollow" href="http://www.collegehillshonda.com/storeart/8thgensedan/courtesylight.jpg">this</a>.<br/><br/>I've got a blue car with a blue interior - so this would be cool. <a rel="nofollow" href="http://www.collegehillshonda.com/honda_civic_hybrid_accessories/06_07_hybrid_electronics.htm">But I'd never pay $80-100 dollars for this.</a><br/><br/>Thanks to anyone who can help.<br/>
12v leds ftw
You just need a large resistor to drop the voltage to 5v. Then solder the 5v power to the positive and negative points on the board mentioned by friedpope above (and remove the batteries) and you should be good to go.
you could also use a 7805 voltage regulator chip.
Can you program the 7805? I might have need for a dual-voltage output circuit in the near future . . .
no, the 7805 puts out a constant 5v+, but there are other similar chips which do the same thing but output different voltages. here is an adjustable one:<br/><a rel="nofollow" href="http://www.radioshack.com/product/index.jsp?productId=2062601&amp;cp=&amp;sr=1&amp;origkw=voltage+regulator&amp;kw=voltage+regulator&amp;parentPage=search">http://www.radioshack.com/product/index.jsp?productId=2062601&amp;cp=&amp;sr=1&amp;origkw=voltage+regulator&amp;kw=voltage+regulator&amp;parentPage=search</a><br/>
Thankee! thankee!
That's an excellent schematic. Your right about the PNP resistor, the anodes of the LEDs are connected to the emitter of the transistor. When you see that it means that a positive voltage will go from the transistor and into the LEDs, a PNP will do that when you bring the base to ground.
Oh, I get it. Thanks so much for the explanation. I'm learning a little bit every day. :)
...thats pretty rad.
You have a sweet car
Hey! I've got that exact same knife. Good people know good tools.
agreed, I have it also. But did you get yours in a set or a single? I have 4 of the kind(just diff. blades)
Just a single, my grandpa had an identical knife for most of his life.
This set was my first, my grandpa gave it to me, I was 8. (I'm 15 now, and they are all in near perfect condition, and are used.) I practice my karate with them(I think I'm a little crazy) lol I'v got <em>soooo</em><br/>many scars from those knifes it beyond funny.<br/>
does target give them away anymore?
Instead of a razor, get a fine grit sand paper in sheet, than lay your GC on that sheet and sand it down
hay could i buy one from you
you are buts becasue this is nutes it is not the bad nuts it is the good nuts lol i love it
How do you short out the resistors? And do you stick the wires in those holes? I dont wanna screw up on my wii target think so please reply.
a smd led driver could be used to control each led individually (but would be quite some work to rewire the board)
What does it do?? I'm very confused.
i cant find one do u guys want to sell me one
You mentioned the non-reflective ink. I won't claim to be an expert, but maybe this is so that the black bars show up more easily to the scanner. If I'm correct, the barcode scanner looks for areas that arent reflecting. But hey, what do I know...
Just bought one off eBay. This will be the heart of my Aqua Team Hunger Force Ignignokt fiber optic button. Yes! I will cause havoc where ever I go in Boston & Cambridge with my "suspicious device" button! Will there be an Instructable? Oh, yes! There will be pictures!
It's aqua "teen", actually.
Indeed it is! Of course, I could claim that I was suffering from Post Traumatic Stress Disorder, brought about by the fear and terror induced by the Mooninites doing it as had as they could to the City of Boston.
haha, fear the mooninites! i must say though, your post inspired me to create my own mooninite badge, although i decided to make Err. I am hoping to have an instructable up soon!
An industrial grade orange cleaner works on most screen printed text on plastic. It can eat into polystyrene though.
Try a sugar cube next time, it works for removing most text from plastic without damaging the plastic... like the razor it takes a bit of time and patience though.
i have a very uneducated question:<br/><br/>is it possible to use IR LED's (1.7 forward voltage with a peak current of 50mA) in this set up?<br/><br/>If you combine <a rel="nofollow" href="http://www.instructables.com/id/EMK9T7Z87FEYF8MDA7/">this project</a> with this gift card project, you could get something portable, adjustable, and aesthetically pleasing (seeing as the gift cards sport the Wii logo already)...<br/>

About This Instructable


68 favorites


More by friedpope: Halloween "Bleeding" Candles Halloween Cemetery Fence Hacking Guide to The Wii GiftCard
Add instructable to: