EmbeddedRelated.com
Forums

COMMUNICATION: HCS12 - RS232 - PC

Started by Unknown March 13, 2003
Hi,

i am using the HCS12 chip (MC9S12DP256) and I have to communicate through the RS-232 with PC. Be so kind and help me. I find any (C source) codes, which could get me started.

Thanx, Martyn




In a message dated 3/13/03 4:42:45 AM Eastern Standard Time,
writes:

> i am using the HCS12 chip (MC9S12DP256) and I have to communicate through
> the RS-232 with PC. Be so kind and help me. I find any (C source) codes,
> which could get me started.
>

I assume you have a c compiler. The compiler already has the functions you
need.... you need to init the sci for 9600 bps operation, and you need a
function to send a character and another to receive a character... these are
putchar() and getchar(); So a simple first program might be

#include <stdio.h>
void main(void){
char c;

initsci();
while(1){
printf("This is a test\n");
}
}



Hi Martyn,

check out the example code in the ACPRD HCS12 reference design, it also
contains some SCI stuff:
http://hc12web.de/acprd
On Thu, 13 Mar 2003 10:40:01 +0100
Martin Hone <> wrote:

> Hi,
>
> i am using the HCS12 chip (MC9S12DP256) and I have to communicate through the RS-232 with PC. Be so kind and help me. I find any (C source) codes, which could get me started.
>
> Thanx, Martyn


Happy HC(S)12ing!
Oliver -----------------
*** Oliver Thamm's HC12 Web *** http://hc12web.de ***
-----------------



Hi
I had the same problem Try to use Version V2 of the Metrowerks it
has automatic beans that start it for you.If you can't find
contcat me I will help you

--- In , Oliver Thamm <othamm_yahgrp@h...>
wrote:
> Hi Martyn,
>
> check out the example code in the ACPRD HCS12 reference design, it
also
> contains some SCI stuff:
> http://hc12web.de/acprd >
> On Thu, 13 Mar 2003 10:40:01 +0100
> Martin Hone <martinhones@s...> wrote:
>
> > Hi,
> >
> > i am using the HCS12 chip (MC9S12DP256) and I have to
communicate through the RS-232 with PC. Be so kind and help me. I
find any (C source) codes, which could get me started.
> >
> > Thanx, Martyn > Happy HC(S)12ing!
> Oliver > -----------------
> *** Oliver Thamm's HC12 Web *** http://hc12web.de ***
> -----------------




Hi, thank you for your reply.
I cant find any beans you wrote, please advise me..
Martin
----- Original Message -----
From: uripeled2000
To:
Sent: Sunday, March 16, 2003 11:34 AM
Subject: [68HC12] Re: COMMUNICATION: HCS12 - RS232 - PC Hi
I had the same problem Try to use Version V2 of the Metrowerks it
has automatic beans that start it for you.If you can't find
contcat me I will help you

--- In , Oliver Thamm <othamm_yahgrp@h...>
wrote:
> Hi Martyn,
>
> check out the example code in the ACPRD HCS12 reference design, it
also
> contains some SCI stuff:
> http://hc12web.de/acprd >
> On Thu, 13 Mar 2003 10:40:01 +0100
> Martin Hones <martinhones@s...> wrote:
>
> > Hi,
> >
> > i am using the HCS12 chip (MC9S12DP256) and I have to
communicate through the RS-232 with PC. Be so kind and help me. I
find any (C source) codes, which could get me started.
> >
> > Thanx, Martyn > Happy HC(S)12ing!
> Oliver > -----------------
> *** Oliver Thamm's HC12 Web *** http://hc12web.de ***
> -----------------

--------------------



Hi
you need to download the new version of the codewarrior V2 (free
trial version) from motorola site.Then when you have this version
you need to create a project with the processor expert it creats for
you the template with the beans. The next step is to add this
internal components and mark the beans that you want (SCI0 in your
case) then
look at the event.c file and AS1.c file

Try this and if you still have some trouble contact me again

Uri --- In , Martin Hones <martinhones@s...> wrote:
> Hi, thank you for your reply.
> I cant find any beans you wrote, please advise me..
> Martin
> ----- Original Message -----
> From: uripeled2000
> To:
> Sent: Sunday, March 16, 2003 11:34 AM
> Subject: [68HC12] Re: COMMUNICATION: HCS12 - RS232 - PC > Hi
> I had the same problem Try to use Version V2 of the Metrowerks it
> has automatic beans that start it for you.If you can't find
> contcat me I will help you
>
> uri.peled@s... > --- In , Oliver Thamm <othamm_yahgrp@h...>
> wrote:
> > Hi Martyn,
> >
> > check out the example code in the ACPRD HCS12 reference
design, it
> also
> > contains some SCI stuff:
> > http://hc12web.de/acprd
> >
> >
> >
> > On Thu, 13 Mar 2003 10:40:01 +0100
> > Martin Hones <martinhones@s...> wrote:
> >
> > > Hi,
> > >
> > > i am using the HCS12 chip (MC9S12DP256) and I have to
> communicate through the RS-232 with PC. Be so kind and help me.
I
> find any (C source) codes, which could get me started.
> > >
> > > Thanx, Martyn
> >
> >
> > Happy HC(S)12ing!
> > Oliver
> >
> >
> > -----------------
> > *** Oliver Thamm's HC12 Web *** http://hc12web.de ***
> > ----------------- >
>
> -------------------- >
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.