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

New!

Thinking MCU? Think TI
Visit the new
TI MCU resource center for the latest videos and documents to help support your design efforts.

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | 68HC12 | Re: force port S to output all '0'

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

Re: force port S to output all '0' - Angel Castillo - Jul 5 19:41:54 2008

You don=B4t need any mosfet for controll led

you may controll with direct conecct to pin ports with
resistor 330 or 470 ohms.

i think you program is correct
maybe your problem is a wrong conection with mosfet.

good look

ANgel Castillo

2008/7/3, Winston Thana :
>
> Hi everyone,
>
> I am working on testing device to check whethere there are any faulty con=
nection between microcontroller and external device.
> The microcontroller I am using is MC9S12A256C. The test device has LEDs t=
o indicate the faulty; light turned on when the connection is fine,
> and off when there is a faulty connection. In this case I just want to ch=
eck Port S connection (internally connected to SCI and SPI)
> so I have each Port S pin connected to a MOSFET to controll a LED on/off.=
(NOTE: ignore Port S pins that are connected to SPI module
> which means PTS0-3 are used only) The problem is that I cannnot force Por=
t S output pins to be '0' with no connection between microcontrolle and ext=
ernal device.
> Eventhough I have disabled a trasmitter and reciever of SCI module and di=
sabled pull-up resistor of Port S as shown in the code below.
>
> Could anyone please advice me how to turn off LEDs for Port S?
>
> PORTS equ $d8
> DDRS equ $da
> PERS equ $dc
> WOMS equ $de
>
> PAGE
> org $c000
> main:
> sei
> clr PORTS
> ldaa #$FF
> staa DDRS
> ldaa #0
> staa PERS
> ldaa #$FF
> staa WOMS
> loop bclr PORTS,$FF
> bra loop
>
> ; Must start at this specific address
>
> org $fff2
> fdb main ; IRQ
> fdb main ; XIRQ
> fdb main ; Trap
> fdb main ; SWI
> fdb main ; COP
> fdb main ; Crystal mon
> fdb main ; System Reset
> Kind regards
>
> Win
>
> _________________________________________________________________
> News, entertainment and everything you care about at Live.com. Get it now=
!
> http://www.live.com/getstarted.aspx
>
> [Non-text portions of this message have been removed]
> ------------------------------------

______________________________
TI's C2000™ microcontrollers controlSUITE™ Desktop gives you instant access to all supporting software libraries, training, collateral, and more!


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