Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

The first few Print-statements are not displayed in terminal

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
StSch

Bascom Member



Joined: 08 Feb 2015
Posts: 8
Location: Heilbronn, Germany

germany.gif
PostPosted: Thu Feb 19, 2015 1:58 pm    Post subject: The first few Print-statements are not displayed in terminal Reply with quote

I am a total beginner to Bascom and Microcontroller-Programming. I have this very simple program:
Code:

$regfile = "m8adef.dat"
$crystal = 3686400
$hwstack = 40
$swstack = 32
$framesize = 60

$baud = 19200

Dim Number As Byte
Number = 0

Print "Hello World"

Do
   Print "Number = " ; Number
   Incr Number
   Wait 1
Loop

End
 

When I start the terminal emulator the output is (for example):
Code:

Number = 6
Number = 7
Number = 8
Number = 9
Number = 10
Number = 11
Number = 12
 

Is there any possibility to also get the first few Print-statements displayed?

Regards,
Steffen

(BASCOM-AVR version : 2.0.7.5 , Latest : 2.0.7.8 )
Back to top
View user's profile
Evert :-)

Bascom Expert



Joined: 18 Feb 2005
Posts: 2107

netherlands.gif
PostPosted: Thu Feb 19, 2015 4:22 pm    Post subject: Reply with quote

I thin you to slow with starting the terminal emulator.
Try this;
Code:

$regfile = "m8adef.dat"
$crystal = 3686400
$hwstack = 40
$swstack = 32
$framesize = 60

$baud = 19200
Wait 5

Dim Number As Byte
Number = 0

Print "Hello World"

Do
   Print "Number = " ; Number
   Incr Number
   Wait 1
Loop

End
 

_________________
www.evertdekker.com Bascom code vault
Back to top
View user's profile Visit poster's website
StSch

Bascom Member



Joined: 08 Feb 2015
Posts: 8
Location: Heilbronn, Germany

germany.gif
PostPosted: Fri Feb 20, 2015 7:20 am    Post subject: Reply with quote

OK, this will work of course. But is there a more solid solution? What if I start the terminal emulator after 10 seconds? There is this example in the Bascom help which also doesn't use such a delay:
Code:

...
Dim A As Byte , B1 As Byte , C As Integer , S As String * 4
A = 1
Print "print variable a " ; A
Print
Print "Text to print."
...
 
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 1801

blank.gif
PostPosted: Fri Feb 20, 2015 9:03 am    Post subject: Reply with quote

StSch wrote:
What if I start the terminal emulator after 10 seconds?

What if you do not look out the window for a minute and people passing by?
Yep, you'll miss them, which is pretty normal.

Nobody prohibits you to do a reset of your hardware having the terminal already opened and focused.
If you do not like the behavior of Bascom's terminal emulator, which stops receiving data, as it looses focus, you can use alternative terminal programs like HTerm.
Back to top
View user's profile
StSch

Bascom Member



Joined: 08 Feb 2015
Posts: 8
Location: Heilbronn, Germany

germany.gif
PostPosted: Fri Feb 20, 2015 2:11 pm    Post subject: Reply with quote

OK, I just wanted to make sure that I am not missing the point here. Thanks for the quick replies.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR 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