View previous topic :: View next topic |
Author |
Message |
StSch
Joined: 08 Feb 2015 Posts: 8 Location: Heilbronn, Germany
|
Posted: Thu Feb 19, 2015 1:58 pm Post subject: The first few Print-statements are not displayed in terminal |
|
|
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 |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
Posted: Thu Feb 19, 2015 4:22 pm Post subject: |
|
|
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 |
|
|
StSch
Joined: 08 Feb 2015 Posts: 8 Location: Heilbronn, Germany
|
Posted: Fri Feb 20, 2015 7:20 am Post subject: |
|
|
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 |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Fri Feb 20, 2015 9:03 am Post subject: |
|
|
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 |
|
|
StSch
Joined: 08 Feb 2015 Posts: 8 Location: Heilbronn, Germany
|
Posted: Fri Feb 20, 2015 2:11 pm Post subject: |
|
|
OK, I just wanted to make sure that I am not missing the point here. Thanks for the quick replies. |
|
Back to top |
|
|
|