PDA

View Full Version : Basic Stamp 2



puri
04-13-2007, 07:47 PM
Hello,

· I am trying to get Basic Stamp to get /accept numbers and depending on the number output a message to Emic voice synthesizer. My project is dealing with heart rate monitor that receives a pulse . I convert the pulse depending on the speed of the pulse, in PIC microcontroller, for PIc does not read PBASIC language ·and emic works well with· Basic Stamp.Hence I used·two microcontrollers.·I converted the pulse to a number 60-110 . I want Basic to receive· that number as hex· or ASCII.or whatever you suggest .·As each range of number 60-70 outputs a text to emic.

Therefore, I need your help with the program ,maybe you have a sample program that could do that.

Please help

Thank You

Mike Green
04-13-2007, 09:26 PM
The PIC needs to send an asynchronous serial byte (1 start bit - logic low, 8 data bits, 1 or 2 stop bits - logic high, no parity, 2400 Baud or 9600 Baud) with the value you wish (0-255). The Stamp uses the SERIN statement to receive this byte, then does whatever you need with the eMic. For the PIC side, you will need to find examples in the Microchip application notes or, if you are using a compiler, there's probably a library routine that will do this for you.

The PBasic manual has all the information and examples you will need in the section on the SERIN statement.

Chris Savage
04-13-2007, 09:40 PM
Puri,

I don’t see any reason why you couldn’t use the BASIC Stamp for the whole project. The BASIC Stamp can measure the pulses depending on pulse width. Or, if you’re looking for BPM you can use the count command. In any event the Emic example code shows how to send information to the Emic properly formatted, so your only real task is getting the code to read the pulses and integrate that with the speech code. Having a single microcontroller (if possible) will greatly simplify things. Take care.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support