Check out Bruce's Website
http://www.rentron.com
or more specifically, pages like this
http://www.rentron.com/ruf-bot.htm
Check out Bruce's Website
http://www.rentron.com
or more specifically, pages like this
http://www.rentron.com/ruf-bot.htm
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Thank you for replying but I did try that website already the ruf bot source code was not functional. I tryed entering it in microcode studio and it gave me a list of things that were wrong.
I'm sure you will hear this eventually from someone, so I might was well be the one to say it:
Have you got just a simple LED blinking? Did you get it responding to your button? Have you got the PIC to read the POT and output the value in some way (like a LCD)? Have you been able to TX/RX serial over normal lines, like with a PC?
Here is the point. As most of us have discovered, there is a bit of a learning curve, both with the hardware portion of PICs as well as the firmware. So start small. Take it a one part at a time. Once all the individual parts are functioning, start assembling the parts into a whole application to meet your needs.
In this process you will get a lot of help from the folks on this forum.
SteveB
Last edited by SteveB; - 6th July 2007 at 20:54. Reason: Typo
That 'ruf bot' code has been posted at that site for quite some time, and I don't think the author would intentionally leave it posted if it didn't work.
So, since you are just beginning in PICs...
Do you have a PIC programmer? Which one?
Do you have PicBasic or PicBasicPro from MeLabs or one of their distributors? Which version?
Which errors did Microcode Studio give you? Which version of MCS are you using?
Have you built a plain ol' 'Blinky LED' type thing yet?
Have you tried to build anything more complicated than that? More than one LED? Pushbuttons lighting LEDs? Pushbuttons controlling servo's?
Don't try and tackle the whole thing at once from the get-go...you'll get discouraged and quit before you even get started... You didn't learn how to drive in a high-performance sports car...
Break it down, simple stuff first, combine the simple stuff into not-so-simple stuff, then put it all together...
EDIT: In other words, just what SteveB said (which I would've had notice had I bothered reading...)
Last edited by skimask; - 6th July 2007 at 20:24. Reason: DOH!
I have done the blinking led and I own picbasic pro that I got from microengineering labs. My programmer I bought from ebay and I do not remember what errors I got since it has been months since I tried it.
How do you know rentron didn't just put it on with out trying the firmware out?
Who knows
But anyway I don't get how reading the inputs work yet.
Let's start simple say I wanted two leds to chase eachother
I connect led 1 to RB0and led 2 to RB1
and I guess I would connect the switch to RB2
but would I have to read RB2 Input
then send and output to RB0 and RB1 when RB2 makes contact?
The PIC I am using is a 16F84A
Last edited by Techbuilder; - 6th July 2007 at 21:06.
And throw ANY credibility out the window? I don't think so... Besides, I've seen their work, I've used their products and software. Good stuff...
Good example of how to use a button and the BUTTON command in Section 5.2 of the PBP manual. But that's probably too much for your example...But anyway I don't get how reading the inputs work yet.
Let's start simple say I wanted two leds to chase eachother
I connect led 1 to RB0and led 2 to RB1
and I guess I would connect the switch to RB2
but would I have to read RB2 Input
then send and output to RB0 and RB1 when RB2 makes contact?
The PIC I am using is a 16F84A
To read a pin, you have to set it to an input (as the datasheet states), you may also need a variable to store the state of that pin so you can work with it elsewhere.
input_pin var portb.2
input input_pin
temp var byte
temp = input_pin
Now "temp" has the state of PortB.2.
Again, break it down to the simplest possible level...
Write a program that reads the portb.2, and have the LED on portb.0 light up if the button on portb.2 is pressed, and the LED on portb.1 light if the button is released.
Ohh I get it that makes perfect sense
So all I would have to do is read the input
but say when I pressed the button I want the RB0 led to flash 4 times and RB1 led to flash 8 times when I press the button once.
How would that work?
Do you mean how would you have the different LEDs flash a different number of times depending on how many times you push the button? This could be accomplished by waiting for the input pin to go high then adding 1 to a pre-defined variable. You would then wait for the input pin to go low before monitoring the input for a high signal. After a pre-defined amount of time waiting for the high signal, the number of button pushes would be stored in the variable that holds the count.
Bookmarks