Serial ports work and work well even on the simplest microcontrollers. Even the ones that do are often at odds with strange drivers on the PC side. However, many microcontrollers have a serial port - even one with a USB converter built-in - but fewer have full-blown USB hardware. Also assuming you can find a working driver and get it working. You could, of course, do the same trick with a composite USB device, assuming you have one. You use these all the time, probably, without realizing it since running a shell under X Windows, for example, doesn’t attach to a real terminal, after all. What you write to that file goes to the fake terminal and you can read anything that is sent from the program connected to the terminal. To the creator, though, it is just another file. To the client, it looks like any other terminal device. These special files were made to feed data to programs that expect to accept data from a terminal. The feature in question is what’s known as pseudoterminal or sometimes a pty or pts. In theory, you could create over 200 ports, but the reality is you will probably want to stick with fewer. But I’m going to show you how you can use a very interesting Linux feature to turn one serial port from a microcontroller into a bunch of virtual ports. Like most things in life, it really isn’t infinite.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |