newbie- any serial (rs232) drivers for propeller using Catalina
ciamo
Posts: 5
Hi Im new to Catalina, does anyone have any serial communication drivers for use with Catalina compiler and the demo board?
Post Edited (ciamo) : 6/29/2010 1:22:10 AM GMT
Post Edited (ciamo) : 6/29/2010 1:22:10 AM GMT
Comments
I have a general purpose serial I/O package under development, but it is not ready for release yet.
In the meantime you can use the PC HMI option - this redirects stdin and stdout to a serial port implemented on whatever is defined as SO_PIN and SI_PIN in Catalina_Common_Input.spin (pins 30 & 31 on most platforms, inlcuding the DEMO board). For example:
If you need to change the baud rate (default is 115200 baud) you will have to change it in both Catalina_PC_Text.spin and Catalina_PC_Keyboard.spin - each implements one half of the full-duplex serial link.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
Post Edited (ciamo) : 7/18/2010 4:16:32 AM GMT
I don't have a general purpose serial driver ready for release yet. You will have to create a new plugin to use a second serial port. You can create one from one of the existing Parallax serial drivers (which will typically occupy one cog) - but this process would be a little complex.
It might be better to simply duplicate the existing PC HMI plugin infrastructure. To do this you will need to copy the PC HMI plugin files (call them something different) configure them for the different pins the second port is to use, and (most importantly!) assign the whole thing a new plugin type. You will then have to modify the Catalina target to launch the new driver (copy the way the existing PC HMI is loaded and launched).
From within your C program you can communicate with the port quite easily by using normal Catalina plugin requests (see catalina_plugin.h for details, or the various Catalina HMI library functions for examples). The only problem with this approach is that a second full duplex serial port will consume 3 cogs!
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina