![]() |
Forum Index : Microcontroller and PC projects : A minor inquiery re startup banner
Author | Message | ||||
Micro-Hal Newbie ![]() Joined: 19/12/2015 Location: United StatesPosts: 5 |
Good morning everyone, new here and I have just a minor question regarding the MMBASIC startup banner. I have the CGMICROBOARD2b which came with MMBASIC Ver 4.7 Beta 36 which I upgraded to beta 37. When I start the board with Tera Term the startup banner seems to terminate early, stopping at the first f in Geoff's name: Micromite Plus MMBasic Ver 4.7 Beta 37 Copyright 2011-2015 Geof > It also did this under beta 36. Is this how the banner is supposed to display? I have the Com port Baud rate at 230400, running Windows 10. The banner was also abbreviated with lower Baud rates. Programming seems to work just fine, all functions and outputs behave as expected. Merry Christmas and Happy New Year! Hal |
||||
cosmic frog Guru ![]() Joined: 09/02/2012 Location: United KingdomPosts: 302 |
I'm lucky to see any of the banner. Usually it's just the last bit of Geoffs name. I think delaying the startup my fix this problem. Dave. |
||||
Bill.b![]() Senior Member ![]() Joined: 25/06/2011 Location: AustraliaPosts: 235 |
The Default baud rate is 38400, Bill In the interests of the environment, this post has been constructed entirely from recycled electrons. |
||||
Micro-Hal Newbie ![]() Joined: 19/12/2015 Location: United StatesPosts: 5 |
Hello Bill & Dave and thank you for your replies. Dave, I agree that in your case when you are missing most of the first part of the banner that a delayed startup may resolve the problem. My problem is that I am consistently missing the same portion of Geoff's full name, being cut off after the first letter f of his first name, as can be seen from the cut and paste in my first post. I am using a Micromite Plus 470 on CircuitGizmo's CGMICROBOARD2b. Hopefully someone will correct me if I am wrong but I believe the startup on this version appears to use Baud rate measuring, since at power up with Tera Term running the banner does not appear until I hit enter on the keyboard. Then the banner pops up (missing the last part of Geoff's name. Also missing is the blank line between the banner and the ready prompt ( > ). Bill, I have tried every supported Baud rate but the result is always precisely the same, as though the firmware is not sending the correct amount of characters. Just now I did set the serial port for 38400 but the result remains the same. This little glitch does not affect the operation of the Micromite Plus, I just thought that in a copyright notice having his full name displayed would be the right thing. Thanks, Hal |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
If you are using the integral USB, the baud rate setting doesn't matter. The default rate for the console pins is 38400. I find it easier to stick with the console pins and an external USB-TTL adapter. Jim VK7JH MMedit |
||||
Micro-Hal Newbie ![]() Joined: 19/12/2015 Location: United StatesPosts: 5 |
Thank you, Jim. Yes, I was using the integrated USB and had forgotten that baud rate settings don't apply to USB. I just received a USB to serial (TTL) breakout using a FTDI FT232RL chip and hooked it up to the console port. Tere Term now shows the full startup banner without clipping Geoff's name. I wonder what the difference is between the integral USB port and using an external bridge to the console during startup? I have also noticed the same clipping on various posts on MM+ that show startup screenshots. It kind of makes me wonder if the integral USB port may clip other messages sent to the terminal. Happy New Year, Hal |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
This is caused by the console output buffer not being big enough to buffer the complete message. I have mentioned it to Geoff previously so he may well fix it in the next release for the MM+, assuming it doesn't use too much additional memory. |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
There is something strange going on here because it could not be the transmit buffer size which is 256 bytes and the banner is less than 100 bytes. The other thing that I do not understand is how you can see any part of the banner in the first place. When the MM+ starts up the first thing it does is initialise the USB and tries to send the banner BUT, you would not have had time to startup the terminal emulator on your PC... so you will never see the banner (when using the internal USB on an MM+ with beta 37). On some earlier betas I tried using a scheme which watched for a connection and then sent the banner but it had too many issues with Windows 10 so I gave up on this. But this must be different. This could be confusing so could you (or anyone else who has seen this effect) confirm: - Are you using the Micromite Plus (ie, MX460)? - Are you using the internal USB? - What version of MMBasic (ie, beta 37)? - What terminal emulator (ie, Tera Term)? - What is your PC's operating system? Geoff (confused) Geoff Graham - http://geoffg.net |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Windows 10 64bit SnadPic with 4.7 beta 37 Apply power to the board. Plug in USB port Start Teraterm select the com port Teraterm has blank screen press enter Jim VK7JH MMedit |
||||
Micro-Hal Newbie ![]() Joined: 19/12/2015 Location: United StatesPosts: 5 |
I have almost the same setup that Jim has except I'm using the CGMICROBOARD2b with the 470 MCU at 4.7 Beta 37. After everything is powered up and the correct virtual comm port is selected Tera Term shows a blinking block cursor. Hit enter and the screen shot Jim is showing above appears. If I use an external USB bridge to the console port (Com 4) then the full banner appears as soon as I apply power to the MM+ Hal |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Thanks Guys, I will setup a test rig and see if I can duplicate it. Geoff Geoff Graham - http://geoffg.net |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
Geoff I definitely fixed this when I was playing with the source at some point but can't remember exactly what I did ![]() I think it may have been increasing USB_TX_BUFFER_SIZE to 256 UPDATE Just confirmed this fixes it. I think the cut-off seems to occur at the 64th character so for some reason USB appears to be putting two characters in the buffer for each one sent. |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
OK, after much investigation I think that I have found the answer... Drum roll... Its a Windows 10 thing !!!! I believe that what happens is something like this: - When the MM+ is reset the first thing it tries to do is send the banner on the USB. - But, nothing is there, so the banner is held in the PIC32's USB buffer. - When a host connects the PIC32's USB then sends the banner. - It seems that Win 7 then throws this data away because a terminal emulator is not running. - Win 10 on the other hand holds onto this data in its buffers. - When Tera Term starts up AND the user sends something Win 10 will THEN sent the data (the banner) to Tera Term. I setup a snadPIC and with B37 it did exactly as Hal and Jim reported (dropped the last part of the banner) but only on a Win 10 machine. The USB Tx buffer in Beta 37 is actually 128 bytes but I had segmented it into two parts (for speed). It seems that the first half of the buffer (64 bytes) was sent but when an ack was not received from the host the code dropped the second half. The fix is easy, I will get the USB to hold off sending the banner until a terminal emulator is started on the host side. I'm now going to find a beer ![]() Geoff Geoff Graham - http://geoffg.net |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
Geoff Great detective work ![]() That explains why when I increased the buffer size to 256 it worked. Half the buffer could hold/send the complete message and W10 then kept it until a terminal was started. The other interesting thing is that you have to type "return" in W10 before the banner appears and then there it is. I hate USB ![]() |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Yes, I agree with you. When I was working on this issue I realised that a lot more than the banner is sent when the processor is restarted. For example, if the watchdog timer has gone off you will get a message on the console saying "Watchdog timeout" but that is lost with a USB console because the USB was also reset. When I first developed the Micromite I got more than a few complaints that USB was not supported... but there are a lot of practical problems with on chip USB in the Micromite type environment. I think that USB still has its place in a stable working system such as a stand alone computer with keyboard and LCD display but in an embedded development environment where reboots are common an external USB-serial bridge is the only way to go. Geoff Geoff Graham - http://geoffg.net |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |