uart/speak up board

The SpeakUp software is a for configuring SpeakUp, the speech recognition click board.
Post Reply
Author
Message
cfloryiv
Posts: 33
Joined: 17 Aug 2013 08:39

uart/speak up board

#1 Post by cfloryiv » 11 Feb 2015 08:15

I'm not sure I'm using the uart code correctly in my program. The data ready function is not returning a 1. Is the uart setup right?

/*
* Project name:
LED_Blinking (Simple 'Hello World' project)
* Copyright:
(c) Mikroelektronika, 2011.
* Revision History:
20110929:
- initial release (FJ);
* Description:
This is a simple 'Hello World' project. It turns on/off LEDs connected to
PORTA, PORTB, PORTC, PORTD and PORTE.
* Test configuration:
MCU: PIC18F45K22
http://ww1.microchip.com/downloads/en/D ... 41412D.pdf
Dev.Board: EasyPIC7 - ac:LEDs
http://www.mikroe.com/easypic/
Oscillator: HS-PLL 32.0000 MHz, 8.0000 MHz Crystal
Ext. Modules: None.
SW: mikroC PRO for PIC
http://www.mikroe.com/mikroc/pic/
* NOTES:
- Turn ON the PORT LEDs at SW3.
*/

void main() {
int times=0;
int ii;
char receive;
TRISA = 0; // set direction to be output

UART1_Init(9600);

while(1) {
if (UART1_Data_Ready()) {
receive = UART1_Read();
} else continue;
switch (receive) {
case '1':
times=1; break;
case '2':
times=2; break;
case '3':
times=3; break;
default:
times=0; break;
}
for (ii=0; ii<times; ii++) {
LATA = 0x00; // Turn OFF LEDs on PORTA

Delay_ms(1000); // 1 second delay

LATA = 0xFF; // Turn ON LEDs on PORTA

Delay_ms(1000); // 1 second delay
}
}
}

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: uart/speak up board

#2 Post by marina.petrovic » 11 Feb 2015 12:56

Hi,

Please, can you explain me a little bit more where the problem occurs?
How you test your project/code?

UARTx_Data_Ready() function tests if data in receive buffer is ready for reading and return 1 if data is ready for reading,
which means that if you send some character over UART, UARTx_Data_Ready() will be set to 1,
when is detected that you have some data in receive buffer (character which you send).

Best regards,
Marina

cfloryiv
Posts: 33
Joined: 17 Aug 2013 08:39

Re: uart/speak up board

#3 Post by cfloryiv » 13 Feb 2015 00:56

Thanks for you're response. I've hooked up a speech board to a pic clicker board. I've programmed the speakup board with three entries which return a 1, 2 or 3. However, the speech board is not sending data when I talk to the board. Should it?

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: uart/speak up board

#4 Post by marina.petrovic » 13 Feb 2015 11:31

Hi,

SpeakUp click should send a index of the recognized word over UART if you use the SpeakUp click in "click" mode
(if you connected UART lines from mikroBUS socket).
To see in which format SpeakUp return recognized word, you can simple connect SpeakUp click over some USB UART board with the PC and watch received data in USART Terminal.

Best regards,
Marina

cfloryiv
Posts: 33
Joined: 17 Aug 2013 08:39

Re: uart/speak up board

#5 Post by cfloryiv » 18 Feb 2015 09:49

How do you setup "click" mode. I dont see any reference to this in the software. Also, do you setup communication as uart or usb?

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: uart/speak up board

#6 Post by marina.petrovic » 18 Feb 2015 17:51

Hi,

SpeakUp application can be used with SpeakUp click only in stand-alone mode.
Click mode means that you connect SpeakUp click with your hardware over mikroBUS socket,
which means that you connected proper UART lines .
Trough UART you can "read" a index of the matched voice command from SpeakUp click.

Best regards,
Marina

middleca
Posts: 2
Joined: 23 Feb 2015 00:49

Re: uart/speak up board

#7 Post by middleca » 23 Feb 2015 00:59

Hello!

I'm having this same issue, and it looks like someone posted about this back in May 2014 as well. I'm seeing "READY" show over the UART serial line, but no command indexes for recognized voice commands. Is there a newer firmware for the "speakup click" module, or something more we can do to get this working? I have confirmed my hardware serial rig is working properly with the "READY" test, and with other microcontrollers.

Thanks,
David

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: uart/speak up board

#8 Post by marina.petrovic » 23 Feb 2015 17:31

Hi,

I believe that I answered you on this forum topic:
http://www.mikroe.com/forum/viewtopic.php?f=148&t=59758

Best regards,
Marina

Post Reply

Return to “SpeakUp Software”