Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing / connecting the Emic TTS Speech Module with a PIC16f876A using mba — Parallax Forums

Interfacing / connecting the Emic TTS Speech Module with a PIC16f876A using mba

xxxPICxxxxxxPICxxx Posts: 1
edited 2006-02-22 21:41 in Robotics
Hi
·
I am trying to interface a Pic16F876A with a Parallax Emic TTS Module. I am also using mbasic professional version to program the PIC. According to the manual the connections seem relatively simple. However, in all my efforts I think I am missing something. I cannot seem to get the emic to talk or at least mumble a word. I am using the SP+/- with the appropriate rated speaker for sound. Here is a simple program that I wrote to simply test the functionality of the speech module.
·
CPU = 16F876A
MHZ = 4
·
;Constants
;

tx con n2400··· ··········· ··········· ; baud
stopbit con 500
cmd con 0x00············· ··········· ;converter text
vol con 0x01··············· ··········· ; volume
spd con 0x02·············· ··········· ; speed
ptch con 0x03············· ··········· ; pitch
eom con 0xaa·············· ··········· ; end of message
msg bytetable "Hello World"················ ; store message
rst con c6································ ; hard reset pin
·
;Initialization
;

gosub reset······ ······················· ; hard rest emic
·
·
; MAIN
·
main:
serout b0, tx, stopbit, [noparse][[/noparse]cmd, vol, spd, ptch, msg, eom] · ; first test
goto main································ ; keep running the program
···········
reset:
··········· low rst························· ; reset the emic
··········· pauseus 100················ ; wait approx 100us
··········· input rst······················· ; float reset pin
return
·
I have all the basic connections necessary to power the PIC. B0 is connected to the SIN pin of Emic board. I am also using C6 to the /reset pin of the Emic. The other 2 connections that I am using on the Emic board is VCC and GND. The 2 switches on the Emic are in off position.
·
Has anyone else successfully used the emic with any PIC? If so, please post your success or if anyone can help me out by seeing my errors, please let me know. I would really like to get this device working shortly. Thank you in advance to everyone who may decide to add something to this thread. I really appreciate it.
·

Comments

  • mmmm Posts: 56
    edited 2006-01-05 23:42
    Why not keep things simple and use one port, the B port of the 876A this way you only need one port directive to set up the Data Direction Register.

    Speaking of the port B and C DDR directive, where are your TRIS directives for setting the B and C port bits as inputs or outputs ?

    I use MBASIC876A but I think it's similar to your version for setting the TRISX directives.

    You should have something like TRISB=%11111110 ' assuming your only using B0 as an output.
    then TRISC=%10111111 ' assumes your using C6 as an output also

    If you used B0 for serial out and B1 for reset then you would only need TRISB=%11111100 'B0 and B1 set as outputs
    near the top of your code.

    Also if you have moved from a stamp to a PIC remember the port directives are opposite of a stamp, a stamp uses 1 to set the DDR as an output pin and 0 to set it as an input while the PIC use 0 to set as an output and 1 to set as an input.

    Also if you want to change Volume, Speed and pitch in the future these should be declared as Variables.

    Mike
  • Bill L.Bill L. Posts: 1
    edited 2006-02-22 20:48
    On the pic 16f877 you have to define the modedef.bas module in order for the rs232 to work. I to am having issues with the emmic card. i'm trying to hook it to the toddler. It says about 5 words and drops out in mid string. I'll keep chugging

    Later
    Bill
  • miniBotminiBot Posts: 11
    edited 2006-02-22 21:41
    I had the same problem...This is what I found out...

    You need Sin and Sout and Busy @ min...

    I have tried all combos and looks like that's the min you need...

    You also have to send a Soft or Hard(Pin)·Reset command at boot

    or it will not work...You need the Sout to get the Ok from the unit

    after reset...

    Good Luck...
Sign In or Register to comment.