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

Discussion Groups | 68HC12 | SCI problem

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

SCI problem - Zámbó Béla - Aug 6 13:43:00 2002

Hi All,
I'm working on a HC12A4 project. I use the SC1 lines with interrupts.
I have no problem with receiving, but transmitting. Sometimes the first
character fails, all other are right.
Maybe my register init order is bad. Could anybody send me an useful
initialization method for transmission with interrupts (TDRE)?
Thanks in advance,
Béla
[Non-text portions of this message have been removed]





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


RE: SCI problem - Medeiros, Armand - Aug 6 13:49:00 2002

I never will again try to use TxEmpty interrupts...never got them to work
properly. I suggest you skip it too! Armand -----Original Message-----
From: Zámbó Béla [mailto:]
Sent: Tuesday, August 06, 2002 11:43 AM
To:
Subject: [68HC12] SCI problem Hi All,
I'm working on a HC12A4 project. I use the SC1 lines with interrupts.
I have no problem with receiving, but transmitting. Sometimes the first
character fails, all other are right.
Maybe my register init order is bad. Could anybody send me an useful
initialization method for transmission with interrupts (TDRE)?
Thanks in advance,
Béla
[Non-text portions of this message have been removed]
--------------------------------------------------------
To unsubscribe from this group, send an email to: To learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu





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

Re: SCI problem - Zámbó Béla - Aug 6 14:00:00 2002

It's sounds very strange :(
I don't give up... (still)
Béla




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

Re: SCI problem - Michael J Huslig - Aug 6 14:19:00 2002

I used a TI RS232 chip which went into sleep mode if it received no activity
for a certain amount of time. I had to change chips because it always
dropped the first character I sent.
Mike

----- Original Message -----
From: "Zámbó Béla" <>
To: <>
Sent: Tuesday, August 06, 2002 2:00 PM
Subject: Re: [68HC12] SCI problem > It's sounds very strange :(
> I don't give up... (still)
> Béla >
> --------------------------------------------------------
> To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit
> http://www.motorola.com/mcu




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

RE: SCI problem - Jim Bacon - Aug 6 14:22:00 2002

I have a working example ... what is Bela's e-mail address?

At 11:49 AM 8/6/2002 -0700, you wrote:
>I never will again try to use TxEmpty interrupts...never got them to work
>properly. I suggest you skip it too! >Armand >-----Original Message-----
>From: Zámbó Béla [mailto:]
>Sent: Tuesday, August 06, 2002 11:43 AM
>To:
>Subject: [68HC12] SCI problem >Hi All,
>I'm working on a HC12A4 project. I use the SC1 lines with interrupts.
>I have no problem with receiving, but transmitting. Sometimes the first
>character fails, all other are right.
>Maybe my register init order is bad. Could anybody send me an useful
>initialization method for transmission with interrupts (TDRE)?
>Thanks in advance,
>Béla >
>[Non-text portions of this message have been removed] >
>--------------------------------------------------------
>To unsubscribe from this group, send an email to: >To learn more about Motorola Microcontrollers, please visit
>http://www.motorola.com/mcu >
>--------------------------------------------------------
>To unsubscribe from this group, send an email to: >To learn more about Motorola Microcontrollers, please visit
>http://www.motorola.com/mcu >

--------------------------------------------------------
Jim Bacon
Engineer
Melles Griot -- Boulder, Colorado

303.581.9635 x329




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

Re: SCI problem - s_spears_2000 - Aug 6 14:28:00 2002

Why don't you post some of your code and let everyone look at
it. You aren't specific about full/half duplex operation or
other parameters either so it's difficult to give advice. Are
you manually gating some sort of transceiver chip? --- In 68HC12@y..., Zámbó Béla <zbela@f...> wrote:
> Hi All,
> I'm working on a HC12A4 project. I use the SC1 lines with
interrupts.
> I have no problem with receiving, but transmitting. Sometimes the
first
> character fails, all other are right.
> Maybe my register init order is bad. Could anybody send me an useful
> initialization method for transmission with interrupts (TDRE)?
> Thanks in advance,
> Béla >
> [Non-text portions of this message have been removed]




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

Re: Re: SCI problem - Zámbó Béla - Aug 6 14:37:00 2002

I use full duplex operation.
The transcevier chip is: SIPEX SP232CPE
A pieces of my code:
---------------------
; Transfer start subroutine
sci1Tstart
ldy #tPuff2 ; Y: transfer buffer address
ldaa 1,y
brclr SC0SR1,TDRE,* ; wait for transmit data register empty
staa SC1DRL ; first data out
ldaa 2,y ; second data to transmit
brclr SC0SR1,TDRE,* ; wait for transmit data register empty
staa SC1DRL ; next data out
movb #SC1CR2maskTIE,SC1CR2 ; enable int. (TIE)
rtc

Only the first data fails often (50%)

Béla




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

RE: Re: SCI problem - Kelley, Dale - Aug 6 14:43:00 2002

You mean it works sometimes, Try setting the IRQ to fetch the char from the buffer each time it hits, it will work much better

-----Original Message-----
From: Zámbó Béla [mailto:]
Sent: Tuesday, August 06, 2002 3:37 PM
To:
Subject: Re: [68HC12] Re: SCI problem I use full duplex operation.
The transcevier chip is: SIPEX SP232CPE
A pieces of my code:
---------------------
; Transfer start subroutine
sci1Tstart
ldy #tPuff2 ; Y: transfer buffer address
ldaa 1,y
brclr SC0SR1,TDRE,* ; wait for transmit data register empty
staa SC1DRL ; first data out
ldaa 2,y ; second data to transmit
brclr SC0SR1,TDRE,* ; wait for transmit data register empty
staa SC1DRL ; next data out
movb #SC1CR2maskTIE,SC1CR2 ; enable int. (TIE)
rtc

Only the first data fails often (50%)

Béla
--------------------------------------------------------
To unsubscribe from this group, send an email to: To learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu




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

Re: Re: SCI problem - Zámbó Béla - Aug 6 14:45:00 2002

Every failed data is $37 when I try to send $38 exactly
Béla




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

Re: Re: SCI problem - Zámbó Béla - Aug 6 14:53:00 2002

wow! So it seems the failed data equals the next data!!!
How can I overwrite transmit data!?
Béla





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

Re: Re: SCI problem - Jim Bacon - Aug 6 15:00:00 2002

Your e-mail address bounces for me. Can you e-mail me directly?
(we can skip the free love readings that way, also)

At 09:53 PM 8/6/2002 +0200, you wrote:
>wow! So it seems the failed data equals the next data!!!
>How can I overwrite transmit data!?
>Béla >
>--------------------------------------------------------
>To unsubscribe from this group, send an email to: >To learn more about Motorola Microcontrollers, please visit
>http://www.motorola.com/mcu >

--------------------------------------------------------
Jim Bacon
Engineer
Melles Griot -- Boulder, Colorado

303.581.9635 x329




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

Re: Re: SCI problem - Sergio Domínguez J. - Aug 6 15:56:00 2002

*This message was transferred with a trial version of CommuniGate(tm) Pro*

Helo Béla

I don't know if I'm misunderstanding your labels, but I see you're using
SC0SR1 (register for SCI0) and SC1DRL (register for SCI1).
Am I wrong?

Sergio

---------------------
; Transfer start subroutine
sci1Tstart
ldy #tPuff2 ; Y: transfer buffer address
ldaa 1,y
brclr SC0SR1,TDRE,* ; wait for transmit data register empty
staa SC1DRL ; first data out
ldaa 2,y ; second data to transmit
brclr SC0SR1,TDRE,* ; wait for transmit data register empty
staa SC1DRL ; next data out
movb #SC1CR2maskTIE,SC1CR2 ; enable int. (TIE)
rtc

Only the first data fails often (50%)

Béla ----- Original Message -----
From: "Jim Bacon" <>
To: <>
Sent: Tuesday, August 06, 2002 3:00 PM
Subject: Re: [68HC12] Re: SCI problem *This message was transferred with a trial version of CommuniGate(tm) Pro*
Your e-mail address bounces for me. Can you e-mail me directly?
(we can skip the free love readings that way, also)

At 09:53 PM 8/6/2002 +0200, you wrote:
>wow! So it seems the failed data equals the next data!!!
>How can I overwrite transmit data!?
>Béla >
>--------------------------------------------------------
>To unsubscribe from this group, send an email to: >To learn more about Motorola Microcontrollers, please visit
>http://www.motorola.com/mcu >

--------------------------------------------------------
Jim Bacon
Engineer
Melles Griot -- Boulder, Colorado

303.581.9635 x329
--------------------------------------------------------
To unsubscribe from this group, send an email to: To learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu





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

Re: Re: SCI problem - Zámbó Béla - Aug 6 16:18:00 2002

BINGO! You're right... I'm stupid:(
Thank you (and everybody who try to help me)!
Sorry about it.
Béla





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