ASCII BEL command

MFB

Senior Member
I'm having trouble trying to get an serial terminal emulator to sound a bell. It does not seem possible to send BEL (or HEX 7) in the same way as the CR or LF commands. There is a BlueTooth link between a PICAXE and a tablet running a terminal emulator, but this app seems to respond as expected to all other ASCII characters.

Please can anyone suggest what it is that I might be doing wrong?
 

hippy

Ex-Staff (retired)
It is not clear if the problem is the PICAXE doesn't get a BEL sent from the emulator, or the emulator doesn't make a sound when it receives a BEL from the PICAXE.

I would suggest trying a different terminal emulator to see if that behaves the same way.
 

MFB

Senior Member
It is not clear if the problem is the PICAXE doesn't get a BEL sent from the emulator, or the emulator doesn't make a sound when it receives a BEL from the PICAXE.

I would suggest trying a different terminal emulator to see if that behaves the same way.
The PICAXE is trying to send a BEL command to the terminal but this command is not accepted by the editor (in the same way as CR for example). I will try to download another terminal emulator to the tabled as you suggest.
 

lbenson

Senior Member
Still not sure what you're saying. In effect, that something like this doesn't result in a sound being produced in your terminal emulator?

serout b.1, T2400_4,(7)

In PE6 simulator, if "Settings", "Special Control Code Functions", "Beep on BEL" is set in the Serial Terminal Simulator, then this code results in the bell being sounded every 2 seconds
Code:
do
  sertxd(7)
  pause 2000
loop
 

inglewoodpete

Senior Member
Adjusting the code provided above by premelec, you can define the BEL constant:
Code:
Symbol BEL = 7
Do
   SerTxd(BEL)
   Pause 2000
Loop
 

srnet

Senior Member
The PICAXE is trying to send a BEL command to the terminal but this command is not accepted by the editor (in the same way as CR for example). I will try to download another terminal emulator to the tabled as you suggest.
Perhaps you could tell us exactly what you mean by "this command is not accepted by the editor" ?
 

MFB

Senior Member
Perhaps you could tell us exactly what you mean by "this command is not accepted by the editor" ?
The terminal responds correctly to sertxd ("*", CR, LF) for example but sertxd ("*", BEL, CR, LF) returns Error: Unknown symbol _ BEL.

As even sertxd (7, CR, LF) does not result in a bell from the tablet, it must be a problem with the terminal emulator.
 

hippy

Ex-Staff (retired)
sertxd ("*", BEL, CR, LF) returns Error: Unknown symbol _ BEL.
That is expected behaviour. PICAXE Editor only has a limited number of pre-defined symbols (CR,LF), so even TAB has to written as 9 or a symbol for TAB has to be created as per inglewoodpete (post #5)

As even sertxd (7, CR, LF) does not result in a bell from the tablet, it must be a problem with the terminal emulator.
Possibly. Terminal emulators often only handle a sub-set of ASCII control codes, though some have an option to show other control codes as their hex equivalents. Or the emulator could be trying to make a beep but the underlying OS or system not letting that sound happen - Some PC software will beep the internal speaker rather than use the sound card so if no internal speaker fitted no sound.
 

MFB

Senior Member
That is expected behaviour. PICAXE Editor only has a limited number of pre-defined symbols (CR,LF), so even TAB has to written as 9 or a symbol for TAB has to be created as per inglewoodpete (post #5)



Possibly. Terminal emulators often only handle a sub-set of ASCII control codes, though some have an option to show other control codes as their hex equivalents. Or the emulator could be trying to make a beep but the underlying OS or system not letting that sound happen - Some PC software will beep the internal speaker rather than use the sound card so if no internal speaker fitted no sound.
Thanks for everyones helpful advice.
 
Top