Overview
- Object ID : 4266 (2023-12-25 19:56:27)
- Author : Ray Allen
- Content : Code
- Microcontroller : Propeller 2
- Language : SPIN2
- Category : Protocol
- Licence : MIT
- Tag : serial debug terminal
Content
This serial driver has a simple Begin() method with no parameters that starts the serial driver using the usual pins and 2 MBaud (For use with the Prop Tool Debug Window).
It also includes a couple methods that include a Spin2 debug statement that will enable the Prop Tool Debug Window, for cases where the main code doesn't have one.
One key caveat for using this is that Begin() must be called after every Spin2 debug statement. Otherwise, there are cases where the code will freeze.
Assembly debug statements do not appear to have this problem in tests to date.
Also, some delays are nice to add after cogspin() and coginit() to avoid jumbling of their serial outputs with those of the code.