Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | 68HC12 | HCS12 serial mysql database queries

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

HCS12 serial mysql database queries - es_styx66 - Feb 26 6:40:58 2007

I need my hcs12 to have access to a mysql database. I assume i need a
c/c++ app running on the mysql PC to receive the queries via serial
communication and execute them, then return the results (if any) to
the hcs12 for processing.

I just don't know where to start. Anyone have any example c/c++
programs for communicating serially with the hcs12? The mysql part I
think I can handle.

Thanks in advance!

-Ben
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )


Re: HCS12 serial mysql database queries - Eric Engler - Mar 1 10:15:24 2007

--- In 6...@yahoogroups.com, "es_styx66" wrote:
>
> I need my hcs12 to have access to a mysql database. I assume i need a
> c/c++ app running on the mysql PC to receive the queries via serial
> communication and execute them, then return the results (if any) to
> the hcs12 for processing.

Any PC language that can support serial and mysql (perhaps thru ODBC)
should be fine. That includes C, VB6, VB.NET, C#, Delphi, and
scripting languages like Python and Perl. And probably dozens of others.

> I just don't know where to start. Anyone have any example c/c++
> programs for communicating serially with the hcs12? The mysql part I
> think I can handle.

I use Delphi and C# to talk to these devices, but I also have VB.NET
code. The trick here is that any serial code for the PC can talk to
these babies, so it doesn't matter what kind of demo code you get.

In Win32 you can't access the serial port directly, so most of us use
objects that can do it for us. If you want to use the WinAPI directly
you can open the port with CreateFile. I don't recommend wrestling
with the Win32 API unless you have some experience with it.

For C and VB6 you can use the MSCOMM.ocx object.

Maybe VC++ comes with an appropriate class for this purpose. Maybe as
part of ATL or MFC?

Here's some VC++ code (anything that works in Windows 2000 should work
in XP):
http://www.codeproject.com/system/cserialcom.asp
http://www.codeproject.com/system/SerialPortComm.asp

Eric


(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )