View Full Version : Discussion Countdown timer for Servo Motor (Load drop), Need Help
MomoTheMonkey
Jan 12, 2009, 09:40 PM
Hi, I have a school project which is to design a Load drop device.
My load drop device is driven by 1 single servo motor. When the arm of the servo moves right , the retaining pin follows, eventually releasing the ball (drop load) from it.
The diagram of this design (Design 2) can be found under the attached file.
I know that through the connection of the servo motor to the channel 5 or other free channel of the receiver of the UAV, the servo can be activated using the transmitter (Remote contoller).
But all this works on remote mode, I wish to look foward to an automatic mode system.
What I plan to do is to set up a countdown timer in which when it countdown and reaches ''0'' the servo will automatically be activated. Once the servo is activated, the ball will be release from the load drop device.
My question is since I am to design a Microcontroller circuit board and connect it to my load drop device, can I connect the whole ''thing-MCT board plus load drop device'' to the receiver channel? or do I need external power source like batteries for it?
I'm using '' ds PIC30F3013 '' Microcontroller IC Chips.
The MCT program I intended in using is '' MPLAB IDE ''. ( is it workable with my ic chip? )
http://www.microchip.com/stellent/idcplgIdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002
Can anyone give me some ideas or suggestion? Thank-you
Regards,
Momo :cool:
AleG
Jan 12, 2009, 10:10 PM
You should get 5 volts from the receiver; you can feed your microcontrller from the servo power leads themselves, no problem as long as you gadget doesn't exeed the maximum current drain the R/C system BEC or battery can supply.
Probedude
Jan 13, 2009, 12:17 AM
Are you tied to that chip? It's way overkill for what you want to do. Look at the pic 10F series.
Almaz
Jan 13, 2009, 05:09 AM
Operation voltage for your Pic is 2.5v-5.5v and as long as your RC runs at 5v it should work fine. http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010343
MomoTheMonkey
Jan 13, 2009, 09:53 AM
Thanks for all your replies :D .
For AleG, so is it to say that the ''load drop (Servo motor)'' is connected to the channel for the 5v and my ''Mircrocontroller circuit board'' just tap the voltage source from the ''load drop (servo motor).
Reciever power 5v---> Servo motor ---> Microcontroller
Am I right or is it the another way round?
For Probedude, are you saying that using this particular chip is hard to complete my task? Its given by my teacher/supervisor for this project. Not sure whether I'm allowed to change it, hope you can elaborate some more? :o sorry to trouble you.
Also thanks to Almaz :p
Regards,
Momo :cool:
AleG
Jan 13, 2009, 10:36 AM
Thanks for all your replies :D .
For AleG, so is it to say that the ''load drop (Servo motor)'' is connected to the channel for the 5v and my ''Mircrocontroller circuit board'' just tap the voltage source from the ''load drop (servo motor).
Reciever power 5v---> Servo motor ---> Microcontroller
Am I right or is it the another way round?
Ehh... I think that's right. Just feed the device from the + and - leads from any channel socket in the receiver. Or if you have no unused sockets in the receiver you can use a Y servo cable, don't use the signal cable and just tap into the red and black wires to get the power to your device.
Make sure you have your polarity right before switching things on and you should be fine.
MomoTheMonkey
Jan 14, 2009, 03:37 AM
But it seems odd, the servo motor has only 3 wire which is to be connected to the receiver channel. How do I tap power for the Microcontroller from the servo motor? there is no additional wire all so?
Btw another thing, since the microcontroller is to control the servo ( do a countdown before activating it ) shouldn't it be the microcontroller circuit board connected to the channel then the servo motor connect to the circuit board?
Please help, really confuse Thank-you.
Regards,
Momo :cool:
Almaz
Jan 14, 2009, 04:50 AM
But it seems odd, the servo motor has only 3 wire which is to be connected to the receiver channel. How do I tap power for the Microcontroller from the servo motor? there is no additional wire all so?
Btw another thing, since the microcontroller is to control the servo ( do a countdown before activating it ) shouldn't it be the microcontroller circuit board connected to the channel then the servo motor connect to the circuit board?
Please help, really confuse Thank-you.
Regards,
Momo :cool:
1st wire = Positive (Connect straight to 5v rail)
2nd wire = Negative (Connect straight to ground rail)
3rd wire = Signal (Connect straight to PIC)
MomoTheMonkey
Jan 14, 2009, 05:21 AM
1st wire = Positive (Connect straight to 5v rail)
2nd wire = Negative (Connect straight to ground rail)
3rd wire = Signal (Connect straight to PIC)
Thanks for replying, then as for the Microcontroller, does it only get connected to the servo's Signal wire? or it recieve its voltage from the signal wire? So sorry to trouble you again :o
Regards,
Momo :cool:
Almaz
Jan 14, 2009, 05:29 AM
Thanks for replying, then as for the Microcontroller, does it only get connected to the servo's Signal wire? or it recieve its voltage from the signal wire? So sorry to trouble you again :o
Regards,
Momo :cool:
Microcontroller must be connected to RC BEC / 5v to get the power. Microcontroller outputs the signal to servo signal wire.
AleG
Jan 14, 2009, 06:15 AM
Thanks for replying, then as for the Microcontroller, does it only get connected to the servo's Signal wire? or it recieve its voltage from the signal wire? So sorry to trouble you again :o
Regards,
Momo :cool:
Uhm, no. The signal wire only carries a PWM signal, 0V for low and 5V (or whatever voltage the transmitter is working on) for the high part of the pulse.
Since you are going to use a timer to activate the load drop servo you don't have to worry about any signals from the receiver. The signal wire doesn't need to be connected to your microcontroller board at all.
MomoTheMonkey
Jan 14, 2009, 06:34 AM
I'm totally confused now.
Almaz said that the signal wire should be connected to the PIC microcontroller but you said that the signal wire doesn't need to be connected to your microcontroller board at all :confused: .
Ok, for my knowledge I know that power source can be tap from the Receiver channel and the pulse signal travels from the microcontroller to the servo ( to sent pulse? like 1ms for ccw and 2ms for cw for the servo turning) . Correct me if I'm wrong.
Can you briefly sum up how should I connect the servo ( 3 wires ) and the microcontroller board ( not sure how many wires, but I know the 5v is a must? ).
Please help me, the project is due at the end of this month. Thank you.
Regards,
Momo :cool:
Almaz
Jan 14, 2009, 06:57 AM
AleG meant to say that if you don't use transmitter to control the load drop device then you don't have to connect RC receiver signal to PIC but you must connect PIC to servo PWM signal to control the servo. I'm just a little bit lazy to do it myself but just draw a circuit how you wish to do it and we'll correct the mistakes for you.
Almaz
Jan 14, 2009, 07:24 AM
Here you go just a quick drawing so you can get an idea.
MomoTheMonkey
Jan 14, 2009, 08:02 AM
Thanks for the diagram :D
Let me sum up what I undertsand, The servo 2 wires (5v and ground) connected to the receiver channel. The signal wire is then connected to the PIC microcontroller.
Ok as for the PIC microcontroller, do it still need to provide it the 5v and ground?
I hope to design something that goes like this:
When the transmitter is activated, it send signal to the receiver activating countdown timer (microcontroller) and then the servo.
The PIC chip initially asked to use : ds PIC 30F3013
Heard not really suitable for the task, is it real?
I'm better off in another chip : PIC18F452
Now I have to design the microcontroller circuit board (don't really know how to start on it- what to add resistor capacitor).
I will try my best to draw the whole system out and maybe the programming, hope you guys can give me some suggestions and hopefully assist me. This project really meant alot to me.
Oh yar, I just delect my autocad and have to do my drawing on paint. It seems that the file is too big to attach in. Is there anyway I can reduce its size? photobucket?
Really thankfull for the patience you guys have on me, thank-you.
Regards,
Momo :cool: The Lost Monkey :o
Almaz
Jan 14, 2009, 08:09 AM
First of all, do you know how to program the whole thing? What language are you going to use? Did you read the datasheet for 30F3013? 30f3013 will do the job but it is overkill for such a simple project. I prefer Proton PicBasic and it probably can do the whole thing in 10-15 lines but it can't program anything higher than 18f series.
MomoTheMonkey
Jan 14, 2009, 09:26 AM
Ok I knew abit of C+ and Micro controller programing. Been using Visual studio 2005 for c+ and MPLAB IDE (free for student www.microchip.com ) for the MCT.
It has been sometimes since I completed my last programming and MCT lesson.For the overrall structure, is it going to be like a '' Count down timer '' prompting the sending of pulse :
Symbol B1 = pw / create a variable pw
pw = 100 / start at extreme left
sweep: pulsout 0,pw /send pulse to motor
pause 18 /set frequency to about 50 Hz
pw = pw + 1 /increase pw by 1
if pw > 200 then back /at extreme right, turn CCW
goto sweep /otherwise, continue
back: pulsout 0,pw /send pulse to motor
pause 18 /set frequency to about 50 Hz
pw = pw - 1 /decrease pw by 1
if pw < 100 then sweep /at extreme left, turn CW
goto back /otherwise, continue
Not sure whether this codes are right, hahaz just trying :D .
If you don't mind, you can help me with the count down timer, I have been doing reseach and reading books, still don't really get the hang of it.
Sorry, I did make the effort to read the datasheet but not really good at it -blank in my head. So your saying that 30f3013 is kind of hard to work with, how about the 18f series? btw is '' Proton PicBasic '' a different programming format to the one I learn?
Thanks for helping :o
Regards,
Momo :cool:
Almaz
Jan 14, 2009, 02:15 PM
Sorry I can't help you because I don't know C+ and don't use MpLab. I would suggest MpLab Forum for help. On the other hand instead of learning the whole thing from a scratch maybe you should consider FlowCode software http://www.matrixmultimedia.com/Flowcode3a-X.php support up to Pic18F
BushmanLA
Jan 14, 2009, 03:51 PM
Momo, this is what I understand you need, tell me if this is correct.
You want a device that will control a servo.
Normally the servo will be in position A (holding the ball).
The device will wait for a signal from your RC transmitter.
When the device receives this signal from the RC transmitter it will start a countdown timer.
At the end of this countdown timer the device will move the servo to position B (ball drop).
If your teacher has experience with PIC microcontrollers, AND has the ability to program them then just about any PIC will do. Make sure he has the correct setup to write, compile, and download the software onto the PIC. If he does not, it is probably too expensive and complicated to get set up correctly for this one project.
I would suggest you use something more suited for beginners like the Basic stamp or the Picaxe.
Here are some links.
http://www.rev-ed.co.uk/picaxe/
http://194.201.138.187/epages/Store.storefront/?ObjectPath=/Shops/Store.TechSupplies/Products/AXE002U
http://www.parallax.com/tabid/295/Default.aspx
http://www.parallax.com/Store/Microcontrollers/BASICStampProgrammingKits/tabid/136/ProductID/300/List/1/Default.aspx?SortField=ProductName,ProductName
The entire setup including the servo and the microcontroller and the RC reciever should all be supplied with 5 volts and a common ground.
In fact if you want to do some reading, the manuals for the BasicStamp and the Picaxe are available online and they both should have examples of how to wire up and move a servo.
Receiving the signal from the RC receiver to the microcontroller should be fairly simple as well. The output from any one of the channels will be a 5V pulse that occurs every 20ms and is 1 to 2ms long depending on the position of the stick on the RC transmitter.
An easy way of doing this is:
Start here
while the signal is 5V wait
while the signal is 0V wait
(Now the signal has gone to 5V, this is the start of a new pulse)
while the signal is 5V, increment a counter and pause 100us
(Now the signal has gone to 0V again and is over)
The counter now contains the length of the pulse in 100us increments
for example if the counter reads 14 then the pulse was 1400us or 1.4ms long.
Note that this is an easy way, but not the best way :)
Also note that the initial two wait statements are needed to make sure you only start timing at the beginning of a new pulse and not in the middle of one that already started etc.
Also, if you save your pictures as jpeg images they will be much smaller.
There are many ways you can do what you are trying to do, you really don't even have to have a microcontoller in the mix, but they make life simple because they are so flexible. Let me know if this is helpful.
MomoTheMonkey
Jan 14, 2009, 07:51 PM
Hi guys,
Thanks Almaz and BushmanLA for the help.
For BushmanLA, you fully understood the whole concept I wanted. My teacher has little experience in either C+ or any MCT programming, his a teacher that teachs other topic.
Just as for the programming part, it really troubled me. It seems that there are too many different types of programming available, and I don't know which 1 to choose. Not sure whether I will jump to the new programming you guys recommanded but of cause C+ or MPlab will be good as I feel more secure.
Oh and for the explaination on uploading of pictures, thanks, I knew you really spend alot of time reading from the 1st post to the very last. Sorry for the trouble.
Yups, I will try doing more research on the website you guys recomanded me. Thanks! Remember to drop often and assist me.
Regards,
Momo :o
Jappa_Indy
Jan 14, 2009, 09:21 PM
Why on earth are you using a dsPic device for this?
A simple 12F675 or other 8 pin device (or even a smaller one) will do the job plus more!!
Also, the free version of the Proton PicBasic compiler can handle this and then some.
You could do this in Proton with only a few lines of code 10-15 max and have it working in under a half hour.
You are asking for a LOT of headaches dealing with configs for the dsPic or the 18F range. I would bet you will spend 90% of you project time trying to get the configs right to even make the chip start.
Coming from many years of PIC experience I even had trouble with configs on these devices. Theres just so much to them.
Also, someone mentioned the PICAXE or BasicStamp. While these will do the job, steer clear as you will soon learn their limitations and by the time youve spent a bundle on either of those options you can have a plethora of PIC development tools, for a lot less money. Besides, they are just PICs anyway, with a lot of lockdown on capability and a middleman price tag.
Here is the entire code for Proton. 12 lines (minus device defines). Took me 5 minutes maybe.
This demonstrates that if the servo signal is less than half then it will go into the for next loop, executing it 10 times with a delay of 1 second for 10 second delay, then moving the controlled servo to 2ms to release the latch.
It could be reduced further by removing the ForNext loop and just using the delay alone however, a small delay in a loop is better coding and allows the pic to "do something" sooner instead of waiting for a long delay to finish.
Dim i As Word
Main:
ServoIn = PulsIn PORTB.0, 1
Servo PORTB.1, 1000
If ServoIn < 1500 Then
For i = 0 To 10
DelayMS 1000
Next i
Servo PORTB.1, 2000
Else GoTo Main
EndIf
End
MomoTheMonkey
Jan 15, 2009, 02:15 AM
Ok I think I will try to get this 12F675 and try it out.
Btw, what kind of programming are you using? ( I'm able to understand the code but not all, is it c+? ).
For the program, do I get the free version from this website: http://www.picbasic.org/
To clear some doubts on the codes,
does the code work in this way: if the signal pulse is less than 1.5ms(neutral) then it will go into the for next loop. The loop execute it 10 times with a delay of 1 second for 10 second delay ( unsure about what this is about- is it the countdown timer 10sec count down? ) . After 10sec it then moves the controlled servo to 2ms to release the latch.
Or is the entire code just on the servo's arm moving from left to right?
For the microcontroller circuit board, can I download the circuit plan from any website? or it needs to be design by myself?
Hope you can clear my doubts, a million thanks to you.
Regards,
Momo :cool:
Almaz
Jan 15, 2009, 05:28 AM
Consider yourself very lucky because we did all the work for you. Download Proton picbasic demo or buy the whole thing. Proton is basic language which is much simpler than C. Install Proteus as well with proton. In proteus you can simulate everything instead of building hardware. I can sell you very cheap Proton and Proteus, if you PM me for more info. Anyway from the receiver 3 pins output which are 5v Power, Ground and signal.
From RC receiver connect
5v Power to 12F675 pin 1 vdd
Ground to 12F675 pin 8 vss
Signal to 12F675 pin 6 GP 1
Servo connection
1st wire 5v power connect to Receiver 5v power
2nd wire ground connect to receiver ground
3rd wire Signal connect to 12F675 pin 7 GP 0
MomoTheMonkey
Jan 15, 2009, 06:15 AM
Hi,
It has been a great help, I got 2 questions :o :
1. you refer to '' Proteus '' - simulate everything instead of building hardware, so its like a simulator to build your code before you build it in proton? Is it a must for my project to have it?
2. How do I connect the computer to the microcontroller chip: 12F675 to insert and save program data?
Thanks, thanks and a million thanks to you guys.
Regards,
Momo :cool:
Almaz
Jan 15, 2009, 06:20 AM
Well, in your case I would use hardware simulation only for this project but Proteus is very nice to simulate most of the projects. You can buy JDM programmer or PicKit2 kit. They are cheap and works great in range $20-$35 or so
MomoTheMonkey
Jan 15, 2009, 06:33 AM
Hi,
Thanks for the explanation :D .
As for the connection of the computer to the microcontroller chip: 12F675 to insert and save program data ;
is their a particular pin for the 12F675 for me to connect it to my computer? like through an USB
after I've entered all the codes, how do i store/save it in the chip.
So sorry to bother you again :o , thank-you.
Regards,
Momo :cool:
Almaz
Jan 15, 2009, 06:38 AM
Every programmer comes with it's own software. JDM usually comes with a CD and can use freeware software to program.
By the way if you want full version of Proton I can sell you for $30.
MomoTheMonkey
Jan 15, 2009, 06:55 AM
Hi,
I will consider on the offer by you, I kind of need to discuss it with my teammates. By the way, I can just use the demo version to complete the whole task right?
Most importantly, we are keen to know about the connection of the 12F675 to the computer. Because we are curious to know how they are connected, throught USB wire and what pin. Do you just do a quick save and the programming infos will all be stored in the chip?
Need your help, thank-you.
Regards,
Momo :cool:
Almaz
Jan 15, 2009, 06:57 AM
Google it, Google it. Once you google JDM or PicKit you'll understand in a second
MomoTheMonkey
Jan 15, 2009, 07:37 AM
Hi,
Having a headach-confuses, I did some research (have I done the wrong research?) on ''PICkit 1 Flash Starter Kit'';
Package Contents:
• PICkit 1 Circuit Board with 8-pin PIC12F675
• PICkit 1 Flash Starter Kit CD-ROM, including the HI-TECH PICC™ LITE C Compiler
• MPLAB® Integrated Development Environment CD-ROM
• Software and Hardware “Tips ‘n Tricks” for 8-pin Flash PIC Microcontrollers Booklet
• USB Interface Cable
Think I know what PICkit are for (kind of seen it before), to transfer data from computer to the ic chip. But since I'm using proton demo software, and the PICkit is for MPlab isnt it uncompaitable?
Basically I just need to know how I program the chip through the computer-USB (PICkit?) and for the microcontroller circuit, do I need the PICkit 1 Circuit Board with 8-pin PIC12F675?
Regards,
Momo :cool:
BushmanLA
Jan 15, 2009, 07:44 AM
. Do you just do a quick save and the programming infos will all be stored in the chip?
Getting the program you wrote on your computer into the PIC requires programmer. There of many different types out there from $30 up.
Let me save you a large amount of time and pain.
Based on you and your instructors level of knowledge that I'm gathering from your posts my advice is this:
DO NOT attempt to use the standard PIC microcontroller for this project. You will get bogged down in choosing a launguage, a compiler, a hardware programmer, and all the other software that makes them work together.
Save yourself some time and go with a Picaxe.
It will come with manuals and examples so that you can learn what is going on. If you fall in love with them, then just move on up to the PIC micro later on.
Unless you want to really get into programming micros for fun or work or you already have some basic electronics background knowledge, diving straight into PICs might be a bit much for you.
MomoTheMonkey
Jan 15, 2009, 08:03 AM
Hi,
I'm thinking of using the proton demo software http://www.picbasic.org/proton_lite.php , since Almaz said its easy.
Now my problem is not really the programming part,
- but how to I transfer the programming data to the IC chip 12F675 and saves it (through PICkit? But is it compaitable to the proton software? )
- do I need a PICkit 1 Circuit Board with 8-pin PIC12F675 to do the transfer?
Does programming goes like this; you do a program and saves it in the IC chip.
Correct me if I'm wrong.
Thank-you guys for helping.
Regards,
Momo :cool:
Almaz
Jan 15, 2009, 10:36 AM
Proton has nothing to do with a programmer. Proton is a compiler which transfers human language to Microchip language and saves HEX file on your computer. Programmer transfer HEX file to your IC microchip. I don't use PicKit 2 myself but I know most of the people prefer to use them. I'm using cheap Serial JDM programmer which you can buy under $20 and it comes with free software or you can use lots of other freeware software with JDM to transfer HEX file from your PC to Microchip.
orraman
Jan 15, 2009, 10:37 AM
Greetings Momo,
Picaxe is a Pic microcontroler which has been pre-loaded with an interpreter programme that greatly simplifies things for engineers.
To see how a working Picaxe can be connected to a computer you could click on this link.
http://www.technologystudent.com/pics/picax2.htm
I have a receiver and a servo connected to one of those boards plus the 3.5mm stereo connector to the computer and 4 AA batteries to power it all.
Provided the transmitter stick is near the middle of it's travel the Picaxe will continue to loop round and round the instructions that are between Main and Main: Note the : this defines a place in the memory (fourth door on the right??) of the picaxe. Move the stick down and the comparison (if b2 >120) fails and the jump is made.
Servo is a subroutine that puts out the pulse that moves the servo on pin 2 to position 100 which is at the opposite end of the travel to position 200.
Pause 22 is the 22 thousandths of a second "elbow room" that the servo routine needs to keep refreshing the servo to hold it in position.
Pulsin causes the micro to search on pin 3 for a pulse starting with a rising edge (the 1) and to place it in the memory of the variable called b2.
If and ONLY IF the stick position on the transmitter in the middle (150) or higher then it is not in the trigger position so jump to Main: and do it all again, and again......
Pause does just that in thousandths of a second.
To interact with this programme download the Free Editor at
www.picaxe.com
Copy and paste the following programme, click simulate, (high left) choose run, click RST (reset), change Generic UP arrow to 150 then RST, then DOWN to 100 then RST......enjoy
Dave
Main:
servo 2,100
pause 22
pulsin 3,1, b2
if b2 > 120 then Main
pause 3000
Hold:
Servo 2, 200
pause 22
GoTo Hold
Almaz
Jan 15, 2009, 10:47 AM
Posted by another user not me
I started this as a reply to the other PicAxe thread but thought it would be more appropriate to start it as a new thread.
I started with PICs on the PICAXE system not too long ago, and I have to give them nothing but high praise. Their chips are pretty cheap and their IDE is free, although not as advanced at Proton's. They have EXCELLENT documentation (something that the Proton guys here should look at and try to emulate) and a very active forum for support that almost always gets timely and knowledgeable replies, even to "daft" and poorly thought out questions.
Once again, their documentation is absoultely wonderful. See this link for examples:
http://www.rev-ed.co.uk/picaxe/data.asp?mode=all
http://www.rev-ed.co.uk/docs/picaxe_manual3.pdf
They don't just document the language and syntax (which Proton has done a good job of), they also give examples of interfacing with LCDs, how to build circuits around the PICAXE, interfacing with other devices, etc. It's very comprehensive and has a great community base. In contrast, if you do a google search on "Proton basic pic" the only sites that come up are this company's sites.
Some serious drawbacks of the PicAxe are the convoluted Basic logic (anyone who has programmed one knows what I mean) and the limited program memory space (~800 lines). It doesn't have direct/easy LCD control, although there are programs/chips you can get cheap/free to do that function.
In contrast, Proton gives you a much better language w/built-in features and a great IDE. You also get the ability to expand your program to your particular PIC's memory limit. But the big reason I see for it's *much* smaller following is the high barrier to entry. Let's face it, your average hobbiest is NOT going to fork over nearly $300USD to play around with PIC programming. The only way it could be justified is if you have a commercial product in mind.
If Proton would lower the barrier to entry (a less crippled Lite IDE, like 200 lines of code, a lower price for full IDE, or sell an intermediate "hobbiest" level license w/code length limits) and draw up some better documentation then Proton could really take off. As it is, it's a wonderful product but suffers from a small base because of that high barrier to entry.
Thanks,
Ray
MomoTheMonkey
Jan 15, 2009, 10:49 AM
Hi,
For Almaz,
so I just need to copy and paste the entire code you provided me into the proton demo and saved it into HEX file. So now, I just need to look for a programmer which can help me to transfer the saved HEX file into the PIC chip. Guess I will try and search for a PICkit in my school.
So for the PICkit, it will contain USB cable, circuit board and the MPlab software.
So do it mean also that I need to work out 1 more code program in the MPlab to transfer the HEX file into the IC Chip?
For Orraman,
so is Picaxe both compiler and programmer? Btw, I'm doing a countdown timer to activate the servo. Which part of the code is the timer in the code, so i can change and adjust the time myself?
So sorry for the troubles guys, thanks again for the great help.
Regards,
Momo :cool:
Almaz
Jan 15, 2009, 12:55 PM
No more codes requires to transfer anything. Programmer transfers everything within a few seconds. Whatever programmer you buy have manual so just read the manual or you can download the manual in PDF format and read it before you buy it.
Now about Picaxe. As I said before compiler is just a software and programmer is a hardware to transfer HEX file from pc to IC.
Jappa_Indy
Jan 15, 2009, 01:09 PM
Oh My , I do not mean to sound like a bugger, but it seems like you are going to have a heap of trouble with any of the options given to you.
Some stuff has been presented a clearly as possible and you still dont seem to understand.
If you must attempt this, just get a basic PICAXE setup. I recommended just going to PICS and Proton assuming you knew at least a little bit about even basic electronics.
This will even be tough for you with a PICAXE. The PICAXE still assumes basic electronics knowledge, get that first.
Almaz
Jan 15, 2009, 01:38 PM
I never used PicAxe myself but PicAxe uses the same Microchip IC. Proton has more options but a lot less support than PicAxe. As you can see the code is almost the same using Proton and PicAxe compiler. If I were you I would start from the beginning such as making blinking Led and get to know basic electronics before you step up with timers and servos. This is too advanced for your skills. Download or buy books such as Electronics for dummies and Picbasic for dummies/starters. Very good books and give you a lot of info. It doesn't take a day or two to learn. It takes years to get basic knowledge.
BushmanLA
Jan 15, 2009, 02:29 PM
The advantage to Picaxe is that the basic package comes with all you need to get started.
Editor (for writing code)
Compiler (for turning code into a file to download onto the PIC)
Programmer (for downloading the file to the PIC)
and the PIC itself.
It isn't as fast or flexible as doing it the 'real' way with MPLAB and Assembly but it is just right for a beginner project like this. :D
For under $60 you can get a full working setup plus a breadboard for prototyping and a few common components.
http://www.sparkfun.com/commerce/product_info.php?products_id=8322
orraman
Jan 15, 2009, 03:55 PM
Greetings Momo,
Quote~~~so is Picaxe both compiler and programmer?~~~~
In a way, yes but all of that is done in the Personal Computer.
In Basic we write in a near English human language that we can understand.
The Picaxe Editor converts that into Machine type language and sends it down through the 3 wires to the Picaxe chip as pulses of voltage.
In all truth I am dyslexic, I count on my fingers and I count upwards, so does the programme
Quote~~~~Pause does just that in thousandths of a second.~~~~~
Main:
servo 2,100
pause 22
pulsin 3,1, b2 '...........counts the length of the pulse in units of 10 microseconds each
................................because this is the pulsin command 100 counts = millisecond
................................and this is most useful for servos
if b2 > 120 then Main'....if the count is less than 120 the transmitter stick is now low
..................................the comparison fails and the program drops through"
pause 3000...............the controller stops and counts up to 3000 in thousandths of a
................................second because this is the pause command and needs to be as
................................accurate as possible for all timing requirements
................................change this number for different delays
Hold:
Servo 2, 200
pause 22
GoTo Hold
The 8 pin development board is very handy, you can download a change to the programme while it is running.
But it is not necessary, a 9 pin serial plug, 2 resistors and a 0.1uF capacitor, it is all in the help files.
Google the Picaxe forum and you will find other beginners there.
Dave
orraman
Jan 15, 2009, 03:57 PM
Greetings Almaz,
Everything your original author wrote was exactly the way it was some time ago.
The Picaxe Editor has improved and the Picaxe range has been expanded.
There had been a proposal to liberalise the Proton Lite but there was considerable resistance within the existing user base.
Proton Basic is now cheaper at $165
http://www.ohararp.com/compilers
However present users of Proton Basic are adamant that it is a best pic basic compiler available, that updates are free, and new picmicros are added very quickly.
Dave
orraman
Jan 15, 2009, 05:16 PM
Greetings BushmanLA,
Thank you for the link but the 8 pin Picaxe on offer is not stated to be the better 08M chip.
Because of that this may be a better bet, but it needs a download cable.
PICAXE-08M Starter Pack
EV-08323
There is a nice picture of a simple download system on an adoption of the 28 pin OLIMEX board on the P H Anderson site.
http://www.phanderson.com/picaxe/
Not as handy as the 3.5mm stereo on the starter pack but cheaper and easy to fit onto a piece of stripboard (Veroboard) with the Picaxe and the circuit.
Dave
BushmanLA
Jan 15, 2009, 06:17 PM
There is a nice picture of a simple download system on an adoption of the 28 pin OLIMEX board on the P H Anderson site.
Olimex rocks. I use their ICD2 Pocket for burning my PICs. Thanks for the heads up. I'm not a Picaxe user myself, I use C18 for big stuff and Picbasic for small stuff.
I'm not sure if anyone has mentioned Arduino or not, I have played with one of those and though it would be a great starter kit as well.
Not that expensive either....
http://www.sparkfun.com/commerce/product_info.php?products_id=666
MomoTheMonkey
Jan 16, 2009, 12:42 AM
Hi,
1 last question, so I have the proton Demo complier and now what I need is a programmer.
The programmer I intended to buy:
PICkit 1 Flash Starter Kit
• PICkit 1 Circuit Board with 8-pin PIC12F675
• PICkit 1 Flash Starter Kit CD-ROM, including the HI-TECH PICC™ LITE C Compiler
• MPLAB® Integrated Development Environment CD-ROM
• Software and Hardware “Tips ‘n Tricks” for 8-pin Flash PIC Microcontrollers Booklet
• USB Interface Cable
Will that do the job? so for all the connection to the 12F675's pins will be through the circuit board right?
Regards,
Momo
Jappa_Indy
Jan 16, 2009, 01:34 PM
Hi,
1 last question, so I have the proton Demo complier and now what I need is a programmer.
The programmer I intended to buy:
PICkit 1 Flash Starter Kit
• PICkit 1 Circuit Board with 8-pin PIC12F675
• PICkit 1 Flash Starter Kit CD-ROM, including the HI-TECH PICC™ LITE C Compiler
• MPLAB® Integrated Development Environment CD-ROM
• Software and Hardware “Tips ‘n Tricks” for 8-pin Flash PIC Microcontrollers Booklet
• USB Interface Cable
Will that do the job? so for all the connection to the 12F675's pins will be through the circuit board right?
Regards,
Momo
You could get these
http://www.sureelectronics.net/goods.php?id=369
http://www.sureelectronics.net/goods.php?id=21
http://www.sureelectronics.net/goods.php?id=22
Thats what I use, except for the pickit1 demo unit.
You can gaet away without the zif adaptor as long as you implement icsp on all your projects.
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.