Can't see data in 20x2 scratchpad

jims

Senior Member
I'm running this code and I can tell that it's working because the Emic 2 module speaks to me. Also, I can see the Xmit and Rcv data on my PC scope. The hserptr value in code explorer increments by 2 each time it speaks. I'm assuming this indicates that it is rceiving 2 bytes of background data. However I can't see any data in the code explorer scratchpad. What am I doing wrong? Thank you, Jims
Code:
[color=Green]'*** 20x2 drives an Emic 2 text to speech module.
'*** hserout on pin 10 (C.0) green wire.
'*** hserin on pin 12 (B.6) white wire.[/color]

[color=Navy]#picaxe [/color][color=Black]20X2   [/color][color=Green]; Define the ?Processor IC Type[/color]

[color=Blue]hsersetup B9600_8[/color][color=Black], [/color][color=Navy]%001[/color]

[color=Black]main:[/color]
[color=Blue]pause [/color][color=Navy]3000  [/color][color=Green]'Pause while Emic 2 initializes.

      [/color][color=Blue]do
       debug
       pause [/color][color=Navy]5000 [/color][color=Green]'Pause long enough for the message to finish.
       [/color][color=Blue]gosub [/color][color=Black]Speak1
       
      [/color][color=Blue]loop
      end[/color]

[color=Black]Speak1:
      [/color][color=Blue]hserout [/color][color=Navy]0[/color][color=Black], [/color][color=Blue]([/color][color=Red]"S"[/color][color=Black], [/color][color=Red]"Testing 1 2 3"[/color][color=Black],[/color][color=Blue]cr) [/color][color=Green]'Xmit speaking message.
      'hserout 0,("W190",cr)  'Set speaking rate to 190 WPM.
      [/color][color=Blue]return[/color]
 

hippy

Technical Support
Staff member
I don't believe DEBUG sends back the background serial data so you would need to add code which actually dumps it using SERTXD. In the previous thread(s) on Emic2 myself and Goeytex gave example code which would show what was being received after a command was sent.
 

jims

Senior Member
Thank you, Hippy. I just loaded and ran Goeytex code. It shows that a (cr and :) are received. The same as I got using serout and serin with some other code. Now I just need to figure out the what I need to add the my code shown in post #1 to do this same thing. Jims
 
Top