comp.lang.ada
 help / color / mirror / Atom feed
From: Gumpy <shepardc@gmail.com>
Subject: Hello, and help with GNAT and Windows USB programming
Date: Sun, 9 Feb 2014 11:59:41 -0800 (PST)
Date: 2014-02-09T11:59:41-08:00	[thread overview]
Message-ID: <da704cfc-3bda-4c39-8a2f-358bb171df37@googlegroups.com> (raw)

First, hello. I'm new here. Forgive me if I'm unfamiliar with this and guide me. 

Next, I've been an embedded software engineer for 25+ years, with 18+ in Ada, though I have not worked with Ada for nearly a decade. Pretty much all of my career has been embedded real-time applications, so I've had very little experience with the PC environment, other than from a user perspective. 

I'm also an up and coming potter. It's a hobby I intend to use to help support my retirement some day. 

I have decided that in order to get myself back into Ada and also learn something about programming in the PC environment that I am going to build a kiln controller to convert my manual electric pottery kiln to a fully automatic kiln. I know I could buy an add-on controller for a few hundred dollars, but what's the challenge in that? I figure I can build a simple system that suits my needs and is expandable as I see fit. I can define custom firing schedules that other systems don't accommodate. Ultimately, I may set it up to control multiple kilns.

So, to start with, I found a USB based thermocouple interface that will be used to sense the temperature inside the kiln. I'll add a USB based relay board to this, and the control software will tie it all together. 

I've never worked in programming a PC environment, and have no experience with programming USB ports. I'm not finding a lot of information online, but did find some past messages in this forum which alluded to Linux USB stuff. I thought I'd put out a request for some help and see if anyone will respond. 

1. When your laptop has several ports, how do you know or find out which port a device has been plugged into? Ultimately, I will need a couple ports for the thermocouple interface and the relay board. 

2. Using GNAT, and potentially GNAT.Serial_Communications, how does one open a USB port and read and write character strings to it (the thermocouple interface has a simple character based command language for setup and taking temperature readings). 

3. Does anyone have any specific code examples for communicating on a USB port that they would like to share, or a link to some example(s) online somewhere? 

I'm sure this probably is easier than I'm making it out, but I'm realizing I've forgotten (archived) a good deal of my Ada knowledge in the past decade of non-use, and so I'm just a bit overwhelmed trying to get up and running. I have  the TDC-GCC-64 compilation system installed on my Vista laptop, and have it functional. My Hello World is working and I have found GNAT.Serial_Communications. That's about it so far. 

Any help that along these lines, including code snippets would be greatly appreciated. 

Craig


             reply	other threads:[~2014-02-09 19:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-09 19:59 Gumpy [this message]
2014-02-09 20:29 ` Hello, and help with GNAT and Windows USB programming sbelmont700
2014-02-09 21:00 ` björn lundin
2014-02-09 22:18   ` Gumpy
2014-02-09 23:37     ` Dennis Lee Bieber
2014-02-09 23:26 ` Dennis Lee Bieber
2014-02-10  9:01 ` Dmitry A. Kazakov
2014-02-12  6:21 ` Per Sandberg
2014-02-19 17:54   ` Gumpy
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox