which BASIC STAMP should I get
mdjet
Posts: 8
Hi,
I'm a newbies when come to programming and I'd like to know which BASIC STAMP should I get for programming the ultrasonic sensor using PIC 16F88?
I'm a newbies when come to programming and I'd like to know which BASIC STAMP should I get for programming the ultrasonic sensor using PIC 16F88?
Comments
Your question is like asking "I have two PIC16F88s and I want to use both of them to communicate with my ultrasonic sensor". It can be done, but it doesn't normally make sense.
I assume you're referring to the PING))) sensor. Download the documentation from the webstore page (here) for the PING))) and read it. It explains pretty thoroughly what the PING))) does and how to use it. There are examples in Stamp Basic of its use. Assuming that you have to use the PIC16F88 for your class project, you'll have to figure out how to generate the short (5us) trigger pulse for the PING))) and how to time the width of the echo pulse. We can't help you with that part. You may be able to get some help there from one of the Microchip forums.
Generating short output pulses and timing input pulses are really fundamental operations with a microcontroller. You should talk with your instructor about books or other references for the PIC16F88 that would show you how to do it. We can't help you with the PIC16F88 programming.
Hooking up one I/O pin to the Ping))) and set it to output..
Make it high(1, on...whatever you want to call it)
Set up that I/O pin for input
Set up a loop that will count time until the pin = 1(from the Ping)
The counter/ variable will hold the raw value that you can later on use to convert to inches or centimeters
It takes only 10 lines of code in SPIN to do this and about the same for the Arduino. The Stamp will have similar ease of use
As you may have noticed from the links on the PING))) webstore page, there are plenty of sample programs for the Basic Stamp and the PING)))
I don't have much experience on programming. With a pic 16F88, what do I need to get for downloading the PBASIC to the PIC16F88? Your help is very much appreciated.
You're usually better off using a Basic Stamp module since that includes the PIC, resonator, EEPROM, plus a voltage regulator, brown-out detector, and RS232 interface so you can directly connect the Stamp to an RS232 serial port. If you want something cheaper, you could get an OEM Kit with includes the parts needed and a printed circuit board to build your own larger sized Stamp.