I am planning to try to make a USB device that combined with a simple piece of software on the computer will be able to display some simple near real time stats on an LCD display, I know some such things exist but given that I am not sure I want to buy one of those and I have the parts I thought this would be fun. If anyone has some advice before I get really into it I would like to hear it. I plan to use a micro controller board that I have that has a built in USB port and came with libraries for it to show up as a mouse, keyboard or serial port. I am planning to use it on my mac with it showing up as a serial port as I believe that will be an easy way to get the stats to it. I may need some help with this project from a few angles because I have never communicated with a serial port from C, I have never used an LCD display with this particular micro controller (but I have used it with the micro controller that it came in a kit with), and I have never read most of the stats from a computer that I will be looking for from a program only from the programs like Activity Monitor or Task Manager.
Glenn wrote:
...I plan to use a micro controller board that I have that has a built in USB port and came with libraries for it to show up as a mouse, keyboard or serial port...


just out of curiosity, which microcontroller? and what kind of stats do you want to show?
rthprog wrote:
Glenn wrote:
...I plan to use a micro controller board that I have that has a built in USB port and came with libraries for it to show up as a mouse, keyboard or serial port...


just out of curiosity, which microcontroller? and what kind of stats do you want to show?


I want to show CPU load, swap used, RAM free, and maybe a few others, those are the ones that come to mind though. I will be using the Teensy++ (http://www.pjrc.com/teensy/).
Unless you've already bought the Teensy++, the AVR Butterfly would be a better choice IMO. The board includes a liquid crystal display (LCD), joystick, speaker, serial port, real-time clock (RTC), internal flash memory, and sensors for temperature and voltage. Not to mention there's lots of example code out for it.

http://www.avrfreaks.net/index.php?module=Freaks%20Tools&func=viewItem&item_id=462

http://www.mouser.com/Search/Refine.aspx?Keyword=556-ATAVRBFLY
Ultimate Dev'r wrote:
Unless you've already bought the Teensy++, the AVR Butterfly would be a better choice IMO. The board includes a liquid crystal display (LCD), joystick, speaker, serial port, real-time clock (RTC), internal flash memory, and sensors for temperature and voltage. Not to mention there's lots of example code out for it.

http://www.avrfreaks.net/index.php?module=Freaks%20Tools&func=viewItem&item_id=462

http://www.mouser.com/Search/Refine.aspx?Keyword=556-ATAVRBFLY


I got the one I am planning to use for a birthday present a while ago.
I assume we're talking Linux here, based on the stats that you said you want to be able to display?
KermMartian wrote:
I assume we're talking Linux here, based on the stats that you said you want to be able to display?


Glenn wrote:
I am planning to try to make a USB device that combined with a simple piece of software on the computer will be able to display some simple near real time stats on an LCD display, I know some such things exist but given that I am not sure I want to buy one of those and I have the parts I thought this would be fun. If anyone has some advice before I get really into it I would like to hear it. I plan to use a micro controller board that I have that has a built in USB port and came with libraries for it to show up as a mouse, keyboard or serial port. I am planning to use it on my mac with it showing up as a serial port as I believe that will be an easy way to get the stats to it. I may need some help with this project from a few angles because I have never communicated with a serial port from C, I have never used an LCD display with this particular micro controller (but I have used it with the micro controller that it came in a kit with), and I have never read most of the stats from a computer that I will be looking for from a program only from the programs like Activity Monitor or Task Manager.


I do believe it's time for another Mac vs. PC thread:

Macs suck for microcontroller development.
KermMartian wrote:
I assume we're talking Linux here, based on the stats that you said you want to be able to display?


Actually Mac OS X, but in theory most of the code would work for either.

EDIT:

Quote:
I do believe it's time for another Mac vs. PC thread:

Macs suck for microcontroller development.


I disagree in this case, I believe that the serial communication I have planned to send the stats will be much much easier on a Unix/Unix like system then on a Windows box. From what I have seen Serial communication on a PC is very difficult, I have not verified yet but I think that it is very easy on other platforms.
Glenn wrote:
KermMartian wrote:
I assume we're talking Linux here, based on the stats that you said you want to be able to display?


Actually Mac OS X, but in theory most of the code would work for either.

EDIT:

Quote:
I do believe it's time for another Mac vs. PC thread:

Macs suck for microcontroller development.


I disagree in this case, I believe that the serial communication I have planned to send the stats will be much much easier on a Unix/Unix like system then on a Windows box. From what I have seen Serial communication on a PC is very difficult, I have not verified yet but I think that it is very easy on other platforms.


Who said anything about Winblows?
I think we can all agree that Windows fails miserably for any sort of low-level port access. I've had excellent luck using it with Linux (once I get all the stty settings worked out, which is highly non-trivial), and I've never tried it with MacOS.
Ultimate Dev'r wrote:
Glenn wrote:
KermMartian wrote:
I assume we're talking Linux here, based on the stats that you said you want to be able to display?


Actually Mac OS X, but in theory most of the code would work for either.

EDIT:

Quote:
I do believe it's time for another Mac vs. PC thread:

Macs suck for microcontroller development.


I disagree in this case, I believe that the serial communication I have planned to send the stats will be much much easier on a Unix/Unix like system then on a Windows box. From what I have seen Serial communication on a PC is very difficult, I have not verified yet but I think that it is very easy on other platforms.


Who said anything about Winblows?


I made an assumption as that is often what people mean, BTW most apple computers are PCs. The other reason I made the assumption is that Mac OS X is in many micro controller programming cases at least as good as Linux and better than BSD. Why would you think that Mac OS X would be worse than any Unix/Unix like system? (I exclude Windows because of the vast amount of software available only for windows even in this category)
Glenn wrote:
Ultimate Dev'r wrote:
Glenn wrote:
KermMartian wrote:
I assume we're talking Linux here, based on the stats that you said you want to be able to display?


Actually Mac OS X, but in theory most of the code would work for either.

EDIT:

Quote:
I do believe it's time for another Mac vs. PC thread:

Macs suck for microcontroller development.


I disagree in this case, I believe that the serial communication I have planned to send the stats will be much much easier on a Unix/Unix like system then on a Windows box. From what I have seen Serial communication on a PC is very difficult, I have not verified yet but I think that it is very easy on other platforms.


Who said anything about Winblows?


I made an assumption as that is often what people mean, BTW most apple computers are PCs. The other reason I made the assumption is that Mac OS X is in many micro controller programming cases at least as good as Linux and better than BSD.


Just because a Mac uses an Intel processor does not make it a "PC", and how did you come up with your assumption of BSD < Mac = Linux?

Glenn wrote:
Why would you think that Mac OS X would be worse than any Unix/Unix like system?


Because Macs have a very long track record of being shitty and *nix the opposite.

On another note: I thought this was a Mac vs. PC debate, not MAC OS X vs. *nix vs. Winblows Razz
Ultimate Dev'r wrote:
Glenn wrote:
Ultimate Dev'r wrote:
Glenn wrote:
KermMartian wrote:
I assume we're talking Linux here, based on the stats that you said you want to be able to display?


Actually Mac OS X, but in theory most of the code would work for either.

EDIT:

Quote:
I do believe it's time for another Mac vs. PC thread:

Macs suck for microcontroller development.


I disagree in this case, I believe that the serial communication I have planned to send the stats will be much much easier on a Unix/Unix like system then on a Windows box. From what I have seen Serial communication on a PC is very difficult, I have not verified yet but I think that it is very easy on other platforms.


Who said anything about Winblows?


I made an assumption as that is often what people mean, BTW most apple computers are PCs. The other reason I made the assumption is that Mac OS X is in many micro controller programming cases at least as good as Linux and better than BSD.


Just because a Mac uses an Intel processor does not make it a "PC", and how did you come up with your assumption of BSD < Mac = Linux?

Glenn wrote:
Why would you think that Mac OS X would be worse than any Unix/Unix like system?


Because Macs have a very long track record of being shitty and *nix the opposite.

On another note: I thought this was a Mac vs. PC debate, not MAC OS X vs. *nix vs. Winblows Razz


If they are all PCs then you have to compare subcategories. PC simply means Personal Computer so Macs started out as PCs and still are mostly that way (everything except the servers). I came up with the comparison between platforms for this based on the amount of software available for them in this area that does not need compatibility layers to run.
Glenn wrote:
From what I have seen Serial communication on a PC is very difficult, I have not verified yet but I think that it is very easy on other platforms.
KermMartian wrote:
I think we can all agree that Windows fails miserably for any sort of low-level port access.
I don't know what either of you are doing wrong but serial and parallel port access is exceeding easy under Windows, and querying system stats is simple if you're familiar with WMI.
benryves wrote:
Glenn wrote:
From what I have seen Serial communication on a PC is very difficult, I have not verified yet but I think that it is very easy on other platforms.
KermMartian wrote:
I think we can all agree that Windows fails miserably for any sort of low-level port access.
I don't know what either of you are doing wrong but serial and parallel port access is exceeding easy under Windows, and querying system stats is simple if you're familiar with WMI.


Is this from C or C++/some other language, I tried to look at how to do serial port access from C a while back and (though I may not have found the best resources that would have easier ways) it looked tricky for someone of my skill level. Also even if it is fairly easy on Windows I would assume that it is basically opening a file or two on any *nix system as the port is represented by a file and allocated a virtual terminal which could probably be used to communicate with it.
Glenn wrote:
benryves wrote:
Glenn wrote:
From what I have seen Serial communication on a PC is very difficult, I have not verified yet but I think that it is very easy on other platforms.
KermMartian wrote:
I think we can all agree that Windows fails miserably for any sort of low-level port access.
I don't know what either of you are doing wrong but serial and parallel port access is exceeding easy under Windows, and querying system stats is simple if you're familiar with WMI.


Is this from C or C++/some other language, I tried to look at how to do serial port access from C a while back and (though I may not have found the best resources that would have easier ways) it looked tricky for someone of my skill level. Also even if it is fairly easy on Windows I would assume that it is basically opening a file or two on any *nix system as the port is represented by a file and allocated a virtual terminal which could probably be used to communicate with it.
I've only accessed the serial port in VB and .NET, though neither treats it as a file (Why would they? It's not a file). I've accessed the parallel port in C with Inpout32 (also works in .NET via P/Invoke), where you just go inp32(port) to read and out32(port, value) to write.
benryves wrote:
Glenn wrote:
benryves wrote:
Glenn wrote:
From what I have seen Serial communication on a PC is very difficult, I have not verified yet but I think that it is very easy on other platforms.
KermMartian wrote:
I think we can all agree that Windows fails miserably for any sort of low-level port access.
I don't know what either of you are doing wrong but serial and parallel port access is exceeding easy under Windows, and querying system stats is simple if you're familiar with WMI.


Is this from C or C++/some other language, I tried to look at how to do serial port access from C a while back and (though I may not have found the best resources that would have easier ways) it looked tricky for someone of my skill level. Also even if it is fairly easy on Windows I would assume that it is basically opening a file or two on any *nix system as the port is represented by a file and allocated a virtual terminal which could probably be used to communicate with it.
I've only accessed the serial port in VB and .NET, though neither treats it as a file (Why would they? It's not a file). I've accessed the parallel port in C with Inpout32 (also works in .NET via P/Invoke), where you just go inp32(port) to read and out32(port, value) to write.


I didn't realize you could call DLLs from C I thought that was part of the reason for C++. On the file issue I was not referring to on Windows, I was referring to *nix where if I remember correctly everything is treated as a file (ports, at least some sockets, etc.). I believe that in /dev there is a file for each serial port on *nix systems. Also Windows is irrelevant for this project as the computer I plan to use it with is a Mac because that is my main machine.
benryves wrote:
Glenn wrote:
From what I have seen Serial communication on a PC is very difficult, I have not verified yet but I think that it is very easy on other platforms.
KermMartian wrote:
I think we can all agree that Windows fails miserably for any sort of low-level port access.
I don't know what either of you are doing wrong but serial and parallel port access is exceeding easy under Windows, and querying system stats is simple if you're familiar with WMI.


It's a lot easier to use Windows 98 and below for direct low-level hardware access compared to Vista and XP (at least when using a real language like C, not some wannabe Visual BASIC Razz)

For an example of this take a look at DirectPad Pro, NTPad and Direct I/O.
Ultimate Dev'r wrote:
It's a lot easier to use Windows 98 and below for direct low-level hardware access compared to Vista and XP
Probably as Windows 9x and friends had no semblance of security whatsoever, and user programs were free to merrily read from and write to any I/O port they chose. Wink You don't need to access those I/O ports for serial ports, and for parallel ports you can use one of the many libraries that handle the port access for you. I looked it up, and apparently you do access serial ports as files under Windows, with a few additional bits and bobs to handle serial port events (pin changes etc).
Quote:
(at least when using a real language like C, not some wannabe Visual BASIC Razz)
If you're going to waste time by writing something in C when it could be written in VB then that's your loss, not mine. Wink
benryves wrote:
Ultimate Dev'r wrote:
It's a lot easier to use Windows 98 and below for direct low-level hardware access compared to Vista and XP
Probably as Windows 9x and friends had no semblance of security whatsoever, and user programs were free to merrily read from and write to any I/O port they chose. Wink You don't need to access those I/O ports for serial ports, and for parallel ports you can use one of the many libraries that handle the port access for you. I looked it up, and apparently you do access serial ports as files under Windows, with a few additional bits and bobs to handle serial port events (pin changes etc).
Quote:
(at least when using a real language like C, not some wannabe Visual BASIC Razz)
If you're going to waste time by writing something in C when it could be written in VB then that's your loss, not mine. Wink


VB is irrelevant for this as I don't plan on using this with Windows (for now at least).
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement