PDA

View Full Version : A time and temperature talking device project



keeble
- 8th September 2007, 09:25
Hi,
I am keeble and I am doing a a time and temperature talking device. It can display both time and temperature too. So does it can produce sound. My project is almost done except it cannot produce sound. It can only display. I am tired of troubleshooting both hardware devices and prgramming codes. All the things work except it cannot produce sound. Can you help me please? I am using CCSC compiler for my project. THe following are the devices I used.
DS1307( Real time clock)
DS1620 ( thermometer chip)
SLED4C
EMIC (Text to speech module)
PIC16F876A

The programming codes and schematics can be easily obtained from the following website.
http://www.rentron.com/CCS_C/SERLED_C.htm.
Please help me. Thank you.

Bruce
- 8th September 2007, 14:54
Make sure you have the EMIC DIP switch set to receive commands in ASCII format.

keeble
- 10th September 2007, 14:11
Is there any setting has to be made in order to work EMIC? Actually I have connected components according to the given circuit and programmed it all the same accroding the the codes available on the site. I did not do anything. Will you plase tell me how to set the EMIC dip switch because i am really new for those stuffs. In the EMIC, it's said if switch 1 is set to on, it will command to ASCII format but I dunno how to set SW1 on. Is it at the programming or hardwared device itself? I did not see any physical switch at the EMIC. Will you please help me? Thank you.

Keeble

Bruce
- 10th September 2007, 14:40
Do you have the EMIC data sheet?

If you don't, I recommend you download a copy. http://www.parallax.com/dl/docs/prod/audiovis/EmicModules.pdf

Unless you have a newer model EMIC, that doesn't have the switch, it should have a 2-position DIP switch
located just below the Winbond IC.

Just like the one shown in this photo below towards the center of the Winbond IC.
http://www.parallax.com/images/prod_jpg/30006.jpg

These are labeled 1 and 2 on the DIP switch. Move 1 to the ON position (up).

Page #5 in the data sheet covers the DIP switch.

keeble
- 12th September 2007, 06:49
As per given suggestion, I have set the EMIC DIP sw1 to ON. But still the EMIC device is unable to produce the sound. Do you think is there any other reason?

Bruce
- 12th September 2007, 15:39
Since this forum is for PicBasic, here's a simple test routine to check out the EMIC module.


DEFINE OSC 20

' -----[ I/O Definitions ]---------------------------

Tx VAR PORTC.0 ' wire to EMIC sin pin
Busy VAR PORTC.2 ' wire to EMIC busy pin
Rst VAR PORTC.1 ' wire to EMIC reset pin

' -----[ Constants ]---------------------------------

BAUD CON 0 ' T2400
Yes CON 1

' -----[ Initialization ]----------------------------
TRISC = %000010100

Setup:
GOSUB Hard_Reset ' restore defaults
PAUSE 1000
SEROUT TX, Baud, ["volume=7;"] ' max volume
GOSUB Check_Busy
SEROUT TX, Baud, ["pitch=1;"] ' adjust voice pitch
GOSUB Check_Busy
SEROUT TX, Baud, ["speed=1;"] ' set speech speed
GOSUB Check_Busy

Talk:
SEROUT TX,Baud,["say= I should be using pick basic pro;"]
GOSUB Check_Busy ' wait for busy to release
PAUSE 10000 ' long pause between message
GOTO Talk

' -----[ Subroutines ]---------------------------------
' -- wait until Busy line released by Emic

Check_Busy:
PAUSE 5 ' allow busy time to activate
WHILE Busy = Yes : WEND ' wait until not busy
RETURN

' Hard reset
' -- good when comm link is lost

Hard_Reset: ' reset to default values
LOW Rst ' pull reset line low
PAUSEUS 200 ' 200uS pause
INPUT Rst ' let reset float

RETURN
I've included the .hex file here for you. Wire your 16F876A to the EMIC as shown in the I/O
Definitions section, and program it with the .hex file attached.

If it doesn't work, then you may have a damaged EMIC module, bad speaker, or something
isn't wired properly. If it does work, let me know.