Shop OBEX P1 Docs P2 Docs Learn Events
which BASIC STAMP should I get — Parallax Forums

which BASIC STAMP should I get

mdjetmdjet Posts: 8
edited 2010-12-08 22:54 in Accessories
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?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-12-05 07:27
    The Basic Stamp and the PIC16F88 are both microcontrollers. In fact, the Stamp is made with a PIC16F57 inside that has a Basic interpreter programmed into it.

    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.
  • mdjetmdjet Posts: 8
    edited 2010-12-05 09:08
    Thanks for the explanation. I downloaded the hex program into my 16F88 but it seemed to do nothing. You are right about I'll have to figure out how to generate the short (5us) trigger pulse for the PING))). I stuck from there even with reading thru the post and instruction. Can you give me a hint on that.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-12-05 10:02
    I don't know what you tried to download into your PIC16F88. The only programs linked from that webpage are for the Basic Stamp or the Propeller, not for the PIC16F88. I think there's one Javelin Stamp program written in Java, but that won't help you.

    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.
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-12-05 10:25
    But as Mike said, using the Ping))) sensor is easy to use with any Micro. Basically all you are doing is..

    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
  • mdjetmdjet Posts: 8
    edited 2010-12-05 18:16
    How do you set it to HI using FlowCode v3.?I couldn't get Flowcode to do that. That's why I'm thinking of getting the Basic Stamp
  • Mike GreenMike Green Posts: 23,101
    edited 2010-12-05 18:40
    We cannot help you with the FlowCode, sorry. You'll have to read the FlowCode documentation and figure it out from that. There are some Basic compilers for the PIC microprocessors that take Basic programs very similar to Parallax's Stamp Basic, but not identical. Unfortunately, these compilers are not free (see here).

    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)))
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-12-08 16:13
    @Mdjet... Have you had much experience programming? If not, i would highly recommend the Stamp. It might be a little pricey to start with(compared to the Propeller or Arduino), BUT it is much easier to work/ learn with. Plus, you will always have the forum community to help you. You also might look at the ping code that other micros use for some inspiration...
  • mdjetmdjet Posts: 8
    edited 2010-12-08 21:14
    Hi Ravenkallen,
    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.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-12-08 21:26
    You can't download a PBasic program to a PIC16F88. As I mentioned before, the Parallax Stamp BS2 is a PIC16F57 that has a preprogrammed PBasic interpreter in it. You can buy a preprogrammed PIC16F57 from Parallax, but there is no way you can get a copy of the interpreter to program other PICs. The PBasic interpreter needs some other parts to make it work properly including a resonator and a 2K byte I2C serial EEPROM. It (the interpreter) stores the PBasic program in the EEPROM and can download a program from the Stamp Editor to the EEPROM by using the PC's serial port or a USB to serial adapter.

    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.
  • mdjetmdjet Posts: 8
    edited 2010-12-08 22:54
    I got it now. So what I need are the BS2 and a BOE, and forget about the 16F88, right? Thanks
Sign In or Register to comment.