PropellerForth tidbit: changing the console speed
PropellerForth 8.01, by default, sets the console at 19,200 baud.
This is mostly for compatibility, and doesn't tax the serial driver; in practice, the I/O routines spend most of their time sleeping. At 80MHz the kernel I/O routines have no trouble doing 230kBps. Increasing the speed can really make a difference when moving a bunch of data to the console, such as when dumping a block of RAM or listing a block of source.
Currently the speed is hardcoded, but that doesn't mean we can't change it. :-)
The magic number there, 176, is the location of the bit time constant inside the kernel -- we use
Have fun!
This is mostly for compatibility, and doesn't tax the serial driver; in practice, the I/O routines spend most of their time sleeping. At 80MHz the kernel I/O routines have no trouble doing 230kBps. Increasing the speed can really make a difference when moving a bunch of data to the console, such as when dumping a block of RAM or listing a block of source.
Currently the speed is hardcoded, but that doesn't mean we can't change it. :-)
\ Set the console I/O speed in bits per second.
\ Takes effect immediately.
\ Example: 115200 console-speed
decimal
: console-speed ( u -- )
second swap / \ get # of cycles per bit
176 L! ; \ change the kernel's constant bit time
The magic number there, 176, is the location of the bit time constant inside the kernel -- we use
L!
, local-store, to override it in the running kernel image. 176 is valid for 8.01 and early alphas of 8.02, but may change in the future -- eventually there will be a supported way of doing this.Have fun!
Labels: propellerforth
2 Comments:
This comment has been removed by the author.
By Angel Claudia, at 5:36 AM
This is a very informative piece. It has very good insights that will help us in calculating on https://essaysworld.net/grade-calculator
By AvaHill, at 8:54 AM
Post a Comment
<< Home