3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Control real world devices with your PC

Step 5Download the picaxe program

Download the picaxe program
Click on the blue arrow to download. If it doesn't download there are some debugging suggestions in the picaxe instruction manual. You can try downloading a simple program to turn a led on and off to check the chip works. This program as it is does nothing until it is connected to a PC as it is waiting for the PC to send it something. If it downloads ok then it is working and the chip is programmed and the next step is to reconfigure the chip as a serial interface chip.

Copy and paste the code below. To view it with color syntax look in View/Options/Editor. The color conventions are similar to VB.Net

main:serin 3,N2400,("Data"),b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13
readadc 1,b1' read the pot then send this back
serout 0,N2400,("Data", b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13)
select case b0' read data bit b0
case <140' if <140 then set servo to one position
servo 2,120
pause 1000' pause a second
else
servo 2,160
pause 1000
endselect
low 2' turn off the servo as serin does this anyway
goto main
« Previous StepDownload PDFView All StepsNext Step »
3 comments
Nov 27, 2009. 1:13 AMreaver26 says:
hello, can i integrate it on mplab IDE compiler? using your codes?
Oct 28, 2009. 7:56 PMsciguy77 says:
 Um, blue arrow? Where?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
29
Followers
3
Author:Dr_Acula