|
I'm trying to use PORTS (from the hc12) as a general i/o register. I can get PS2-PS7 to work, but PS0 and PS1 are not because they are RXD and TXD respectively. Is there a way i can disable these so i can use PS0 and PS1 for general purpose i/o? Eileen |
|
|
|
Sorry if this is the obvious answer you've already tried.... You should be able to disable the SCI subsystem by clearing the TE and RE bits in the SCCR2 control register ($102D). This should return control of the pins to your program. Brian --- eileeniicg <> wrote: > I'm trying to use PORTS (from the hc12) as a general i/o register. I > can get PS2-PS7 to work, but PS0 and PS1 are not because they are > RXD and TXD respectively. Is there a way i can disable these so i > can use PS0 and PS1 for general purpose i/o? > > Eileen __________________________________ |
|
|
|
I tried to disable the TXD and RXD by initializing the SCI system, but it didn't work. The terminal would freeze after i ran my initialization. Maybe i'm doing something wrong? Here's my code (for hc12). INTKEY lds #$9f0 movb #$34,SC1BDL ;baud rate 9600 movb #$00,SC1BDH movb #$00,SC1CR1 ; movb #$00,SC1CR2 ; turn off txd and rxd ldaa SC1SR1 staa SC1DRH; ldaa #$04 rts --- In , Brian Moerdyk <bmoerdyk2@y...> wrote: > Sorry if this is the obvious answer you've already tried.... > > You should be able to disable the SCI subsystem by clearing the TE and RE bits > in the SCCR2 control register ($102D). This should return control of the pins > to your program. > > Brian > > --- eileeniicg <Eileen@r...> wrote: > > I'm trying to use PORTS (from the hc12) as a general i/o register. I > > can get PS2-PS7 to work, but PS0 and PS1 are not because they are > > RXD and TXD respectively. Is there a way i can disable these so i > > can use PS0 and PS1 for general purpose i/o? > > > > Eileen > > > > __________________________________ |
|
|
|
Eileen, The secret to your problem is in the phrase "The terminal would freeze". Once you change RXD and TXD to general purpose I/O they can no longer be used to communicate. You must choose one or the other; communicate or general purpose I/O. You can't do both at the same time. Emmett Redd Ph.D. mailto: Associate Professor (417)836-5221 Department of Physics, Astronomy, and Material Science Southwest Missouri State University Fax (417)836-6226 901 SOUTH NATIONAL Dept (417)836-5131 SPRINGFIELD, MO 65804 USA > -----Original Message----- > From: eileeniicg [mailto:] > Sent: Wednesday, December 03, 2003 12:28 AM > To: > Subject: [m68HC11] Re: RXD TXD > > I tried to disable the TXD and RXD by initializing the SCI system, > but it didn't work. The terminal would freeze after i ran my > initialization. Maybe i'm doing something wrong? Here's my code (for > hc12). > > INTKEY lds #$9f0 > movb #$34,SC1BDL ;baud rate 9600 > movb #$00,SC1BDH > > movb #$00,SC1CR1 ; > movb #$00,SC1CR2 ; turn off txd and rxd > > ldaa SC1SR1 > staa SC1DRH; ldaa #$04 > rts > > --- In , Brian Moerdyk <bmoerdyk2@y...> wrote: > > Sorry if this is the obvious answer you've already tried.... > > > > You should be able to disable the SCI subsystem by clearing the TE > and RE bits > > in the SCCR2 control register ($102D). This should return control > of the pins > > to your program. > > > > Brian > > > > --- eileeniicg <Eileen@r...> wrote: > > > I'm trying to use PORTS (from the hc12) as a general i/o > register. I > > > can get PS2-PS7 to work, but PS0 and PS1 are not because they > are > > > RXD and TXD respectively. Is there a way i can disable these so > i > > > can use PS0 and PS1 for general purpose i/o? > > > > > > Eileen > > > > > > > > > > > > __________________________________ > > > > ------------------------ Yahoo! Groups Sponsor > > To unsubscribe from this group, send an email to: |
|
First of all, as you know you're asking this in the HC11 list although you work with the HC12. Maybe you'll get better help from the HC12 list. The previous hint to disable the SCI's TX and RX lines is correct. However, I suspect you're using a built-in monitor (for debugging) that also uses the SCI. In that case, these pins will either be reserved while in 'monitor' mode or free for your use but without terminal connection to the 'monitor'. "You can't eat you pizza and have it, too" ----- Original Message ----- From: "eileeniicg" <> To: < > I tried to disable the TXD and RXD by initializing the SCI system, > but it didn't work. The terminal would freeze after i ran my > initialization. Maybe i'm doing something wrong? Here's my code (for > hc12). |
|
|
|
What do you mean by "The terminal would freeze" ? Is this a debug terminal on the serial port? --- eileeniicg <> wrote: > I tried to disable the TXD and RXD by initializing the SCI system, > but it didn't work. The terminal would freeze after i ran my > initialization. Maybe i'm doing something wrong? Here's my code (for > hc12). > > INTKEY lds #$9f0 > movb #$34,SC1BDL ;baud rate 9600 > movb #$00,SC1BDH > > movb #$00,SC1CR1 ; > movb #$00,SC1CR2 ; turn off txd and rxd > > ldaa SC1SR1 > staa SC1DRH; ldaa #$04 > rts > > --- In , Brian Moerdyk <bmoerdyk2@y...> wrote: > > Sorry if this is the obvious answer you've already tried.... > > > > You should be able to disable the SCI subsystem by clearing the TE > and RE bits > > in the SCCR2 control register ($102D). This should return control > of the pins > > to your program. > > > > Brian > > > > --- eileeniicg <Eileen@r...> wrote: > > > I'm trying to use PORTS (from the hc12) as a general i/o > register. I > > > can get PS2-PS7 to work, but PS0 and PS1 are not because they > are > > > RXD and TXD respectively. Is there a way i can disable these so > i > > > can use PS0 and PS1 for general purpose i/o? > > > > > > Eileen > > > > > > > > > > > > __________________________________ > __________________________________ |
|
At 04:08 PM 3/12/03 +0200, you wrote: >. Maybe you'll get better help from the HC12 list. > Is there such a thing ?? I tried to subscribe to the HC08 list but it is useless, supposedly it is a digest format with a once a day mailout, but everytime I tried to send a message it bounced back... so I did the intelligent thing and unsubscribed :-) Regards John Samperi ****************************************************** Ampertronics Pty. Ltd. 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA Tel. (02) 9674-6495 Fax (02) 9674-8745 Email: Website http://ampertronics.com.au * Electronic Design * Technical Services * Contract Assembly ****************************************************** |
|
|
|
John, Sign up, they are all the same as the HC11, and more traffic on both now, HC11 group slowly loosing ppl to the other groups, micro's. Since the HCS12 the HC12 list has really kicked on... http://groups.yahoo.com/group/68HC05_08/ http://groups.yahoo.com/group/68HC12/ regards, Darren > -----Original Message----- > From: John Samperi [mailto:] > At 04:08 PM 3/12/03 +0200, you wrote: > >. Maybe you'll get better help from the HC12 list. > > > Is there such a thing ?? I tried to subscribe to the HC08 list > but it is useless, supposedly it is a digest format with a once a day > mailout, but everytime I tried to send a message it bounced back... > so I did the intelligent thing and unsubscribed :-) > > Regards > > John Samperi |
|
Did you subscribe to the right one? It is Or Note that the above groups are 'hidden'. Go to http://e-www.motorola.com/webapp/sps/site/homepage.jsp?nodeId=03M0ym4t3ZG And on the bottom of the page you can subscribe. Erich > -----Original Message----- > From: John Samperi [mailto:] > Sent: Donnerstag, 4. Dezember 2003 23:37 > To: > Subject: Re: [m68HC11] Re: RXD TXD > At 04:08 PM 3/12/03 +0200, you wrote: > >. Maybe you'll get better help from the HC12 list. > > > Is there such a thing ?? I tried to subscribe to the HC08 > list but it is useless, supposedly it is a digest format with > a once a day mailout, but everytime I tried to send a message > it bounced back... so I did the intelligent thing and unsubscribed :-) > > Regards > > John Samperi > > ****************************************************** > Ampertronics Pty. Ltd. > 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA > Tel. (02) 9674-6495 Fax (02) 9674-8745 > Email: > Website http://ampertronics.com.au > * Electronic Design * Technical Services * Contract Assembly > ****************************************************** > > ------------------------ Yahoo! Groups Sponsor > ---------------------~--> Buy Ink Cartridges or Refill Kits > for your HP, Epson, Canon or Lexmark Printer at MyInks.com. > Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/dN_tlB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: |