Reviving serial COM port functionality using Flowcode + USB

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply

Please rate this article out of 5: (1 being the worst and 5 being the best)

1
0
No votes
2
0
No votes
3
0
No votes
4
0
No votes
5
0
No votes
 
Total votes: 0

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Reviving serial COM port functionality using Flowcode + USB

Post by Benj »

Image

COM ports and serial data have been around for a long time and have been built into a wide range of electronics devices. Computers are now being built without the standard COM and Parallel ports so there needs to be a new way of interfacing electronics to PCs. All modern PC’s are supplied with an abundance of USB ports so it makes sense to embrace this new standard and design our hardware using the USB standard. Another reason to choose USB is that it can supply power to run your external hardware as well as being in the standard voltage for communication so no voltage shifting is required.

Using the new USB pack for Flowcode it is possible to create a virtual COM port over the USB, allowing people with legacy COM devices to carry on using their devices on PCs that are lacking the original COM port without having to do any modification to the PC software.

The USB Serial component is very simple to use and uses similar functions to the current RS232 component. As well as this the USB Serial component also allows for strings or arrays of data to be sent and received. This helps if you want large amounts of data throughput for your system without waiting for the next USB transaction. The only difference is that the USB Serial component has an Initialise function, which must be called to start the USB enumeration process before calling any of the other USB routines.

Another bonus of the USB Serial component is that it allows you to program extra functionality into your designs. For example you can create a simple routine to try to enumerate the USB. If this is successful then you could for example reprogram the EEPROM which could have an effect on your program output. This would allow for firmware upgrades or modifications to be performed without any modifications to the system hardware.

The USB Components are available for download from here, also there is a small presentation showing some of the features of the USB Pack.

http://www.matrixmultimedia.com/FlowcodeUSBPack.php
Attachments
USB Serial String Demo.fcf
(7.5 KiB) Downloaded 585 times
USB Serial Demo.fcf
(7 KiB) Downloaded 547 times

Post Reply