![]() |
Forum Index : Microcontroller and PC projects : Max Baud of COM1/COM2?
Author | Message | ||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
Is there a specific valid increment because I get complaints >921_600. ![]() Craig Edited 2022-12-13 18:20 by Tinine |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
syntax errors or complaints from the rx/tx end, i.e. data drops? generally UARTs tend to have set values e.g. you have to use 9600 and trying to set at 9500 will bring an error. I am guessing this is your problem. I have used the UART at 230400 which is a multiple of 115200, which is a multiple of 57600 etc... if you try multiples from 460800, then 921600, doubling each time then I suspect you'll be OK (maybe?) Following this logic, your first >1e6 should be 1843200. There are exceptions... 38400 comes out of the blue (but is one of the multiple plus another one - 28.8k+9.6k) give it a whirl doubling each time - 'swhat I would do Edited 2022-12-13 22:06 by CaptainBoing |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
Sorry, should've been more specific; it's MMBasic that complains: ![]() |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
I get an expected error message: ![]() "1036800 is invalid (valid is 24)" - is definitely an odd error message, and I suspect it is a bug of some sort. What are you using? 170 MM2 chip? MM+ chip? ARMmite? PicoMite or PicoMite VGA? My message came from a MM2 on a 170 chip, simply as I happened to be writing something at the time I checked the forums, and everything was all hooked up, so I was able to do a quick spontaneous test. EDIT: Just tried this on a PicoMite, and I get the following error report: ![]() So, it looks like you've maxed out the com port speed. ![]() Edited 2022-12-13 22:35 by Grogster Smoke makes things work. When the smoke gets out, it stops! |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
Yeah, Picomite with MMC (MMEdit) 921_600 is pretty darned respectable actually. Just pushing my 4 X RP2040 + Prop2 to see if I can break it ![]() Craig |
||||
Pluto Guru ![]() Joined: 09/06/2017 Location: FinlandPosts: 375 |
![]() These are the standard speeds. |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
User manual: "Well over 1000000" ![]() |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
we'll consider it theoretical ![]() was a little bit surprised in Grogster's screen grab, minimum baud is 126... 110 was common on a lot of older stuff, and while I agree it isn't common now, I would have imagined compatibility just because... Tinkerers beware! Edited 2022-12-13 22:59 by CaptainBoing |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5091 |
If you use picomite, it my even depend on the CPUSPEED option. The minimum baudrate most likely is limitted by the divider and the clock. 110 baud is really old.... I am from the 300 baud area. And 75 baud for TELEX. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
For dedicated UARTS, seems artificially slow. Not a problem for my application due to very short packets. I won't be running at this speed. Craig |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
I've never needed anything faster then 115k2, but that is just me. It is impressive that you can get upwards of 1Mb UARTS on an interpreted BASIC. The "well over 1000000" thing is probably a hangover from the Micromite Plus range of devices based on the PIC32MX470 series chipset. They have hardware UART's that were easily capable of that, but the lesser-spec chips I think could not go as fast with their UART's. The 2040 chip used in the PicoMite I THINK has hardware UART's, but they obviously can't run QUITE as fast as the MM+ chip UART's. In any event, 921k6 is all you're gonna get. ![]() ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
It seems to me that the RP2040 is very conservative which is fine by me. There is a YT vid where they clocked it to either 420 or 460MHz and measured the internal temp and it hit 42(C). They eventually frosted it and went to 1GHz. It functioned but soon fried. 115k2 is comfortable for me; I can write 48 douts and read 48 dins from four RP2040s in well under 10ms which is pretty snappy for low priority I/O ![]() Craig |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7938 |
The PIO enables you to create custom serial interfaces which can reach *very* high bit rates. This has been done using multiple PicoMites to emulate transputers. A transputer has four serial ports so that worked out nicely using one PIO to do four TX lines and the other to do four RX lines. Remember that a PIO can run its state machines at up to one instruction per CPU clock cycle, and multiple operations can take place on each instruction. IIRC the RP2040 Data Sheet (all 600 and odd pages of it!) has an example of creating serial ports. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
The issue isn't uart speed, it is the lack of H/W buffering. Each character generates an interrupt so 1,000,000 baud would be 100,000 interrupts a second. You can get round this with DMA but this is pretty useless for random I/O as you don't know how many bytes to receive and can't do any processing until the transmission completes |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |