Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Hyperterminal Hangs?

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various
View previous topic :: View next topic  
Author Message
philm

Bascom Member



Joined: 14 Jul 2004
Posts: 138
Location: Australia

australia.gif
PostPosted: Sun Sep 19, 2004 2:10 am    Post subject: Hyperterminal Hangs? Reply with quote

When I use ANSI/VT100 terminal control escape sequences, after a time, Hyperterminal hangs my computer. It works fine for a little while, but then hangs.
Code:
'***************************************************************
'ANSI Clear Screen
'***************************************************************
Ansicls:
Printbin 27 ; 91;                                           'escape [
Print "2J";                                                 'erase screen
Return

'***************************************************************
'ANSI Locate
'***************************************************************
Sub Ansilocate(byval Row As Byte , Byval Col As Byte)
Printbin 27 ; 91;                                           'escape [
Print Row ; ";" ; Col ; "H";                                'force cursor position
End Sub

'***************************************************************
'ANSI Clear current line
'***************************************************************
Ansiclrline:
Printbin 27 ; 91;                                           'escape [
Print "2K";                                                 'erase the current line
Return

Is there a better (free) ANSI/VT100 terminal emulation prog?
Thanks
Phil
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 6198
Location: Holland

blank.gif
PostPosted: Sun Sep 19, 2004 2:13 am    Post subject: Reply with quote

When the BASCOM terminal emulator does work, i can create a stand alone terminal emulator when you can not find another one.
_________________
Mark
Back to top
View user's profile Visit poster's website
Frankeman

Bascom Member



Joined: 11 Aug 2004
Posts: 948
Location: the Netherlands

netherlands.gif
PostPosted: Sun Sep 19, 2004 9:16 am    Post subject: Reply with quote

Hi,

Do you know when HyperTerminal hangs or is it random ?
Is it possible that you send invalid esc codes ?

Frank.
Back to top
View user's profile
philm

Bascom Member



Joined: 14 Jul 2004
Posts: 138
Location: Australia

australia.gif
PostPosted: Mon Sep 20, 2004 12:00 am    Post subject: Reply with quote

Mark,
The inbuilt terminal emulator does not hang, but it after a while it shows a blank screen. All I can see is the cursor moving around to the correct positions, but no characters.
Frank,
I am using serial at 38400 and stream constant data.
I suspect that hyperterminal hangs when it's input buffer overflows. I have a slow (330MHz) computer, and do not use any handshaking.
So I would guess that other programs will do the same or similar.

Maybe Mark can include xon/xoff flow control into all the print statements (only joking).
Maybe it is a good excuse to get a new computer.
Phil
Back to top
View user's profile
Frankeman

Bascom Member



Joined: 11 Aug 2004
Posts: 948
Location: the Netherlands

netherlands.gif
PostPosted: Mon Sep 20, 2004 10:21 pm    Post subject: Reply with quote

Hi Phil,

I wrote a little test program
Code:

$regfile = "8052.dat"
$baud = 57600
$crystal = 11059200

dim a as long

do
  print a
  incr a
loop

end
 

With this received on a P4 3Ghz terminal emulatie never craches.

A super high baudrate is in some case not effective.
For example if you have a processor running at 1 Mhz and a baudrate of 256000 the processor can simply not make the data to send in one contant stream.

In my test prog with a baudrate of 19200 the counter is at 4000 after one minute.
When i increase the baudrare to 57600 (3 times faster) the counter is at 4300 after one minute.
Thus not 12000 what you might have been expected.

A baudrate of 19200 is mostly the highest speed to send data.

Frank.
Back to top
View user's profile
philm

Bascom Member



Joined: 14 Jul 2004
Posts: 138
Location: Australia

australia.gif
PostPosted: Tue Sep 21, 2004 12:33 am    Post subject: Reply with quote

Yes the program as a whole will not run 3 times faster, but the "print a" statement will run 3 times faster.
what happens if you run this.
Code:

$regfile = "8052.dat"
$baud = 57600
$crystal = 11059200
declare sub Ansilocate(byval Row As Byte , Byval Col As Byte)
dim a as byte
gosub Ansicls
do
  Ansilocate(10, 10) 'locate somewhere
  print a;
  incr a
  if a = 0 then gosub Ansicls 'clear screen every 256 iterations
loop
end

Ansicls:
Printbin 27 ; 91;                                           'escape [
Print "2J";                                                 'erase screen
Return

Sub Ansilocate(byval Row As Byte , Byval Col As Byte)
Printbin 27 ; 91;                                           'escape [
Print Row ; ";" ; Col ; "H";                                'force cursor position
End Sub
Back to top
View user's profile
Frankeman

Bascom Member



Joined: 11 Aug 2004
Posts: 948
Location: the Netherlands

netherlands.gif
PostPosted: Tue Sep 21, 2004 6:31 pm    Post subject: Reply with quote

Quote:
what happens if you run this.
I get compiler errors Wink ,Your example is Bascom AVR code i use Bascom 8051.

The program works fine, hyperterminal don't hangs.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum