Skip to main content
Visitor II
November 6, 2010
Question

I/O PORTS

  • November 6, 2010
  • 2 replies
  • 591 views
Posted on November 06, 2010 at 23:34

Dear,

I need your help about...I'm programing by asm,

I need to use the outputs ports to control lcd numbers. i don't know how to do to prepair the port to do output port. I don't understand the port configuration and usage manual 14587 page 100

Is the adress 0x5000 the correct adress to take out the data port a?

 void main(void)

{

#asm

LD A,#2

 LD $0,A

 ld a,#4

 ld $2,a

 mov $3,$0

 ld a,#8

 ld $f,a

  ld a,#4 

 ld $0x5000,a ''PORT A DATA OUTPUT REGISTRER''

 #endasm
    This topic has been closed for replies.

    2 replies

    Visitor II
    November 7, 2010
    Posted on November 07, 2010 at 21:05

    hi,

    before putting a data output on portA, you need to configure the port:

    LD A, #255

    LD $5002, A ;output push pull 

    LD $5003, A ; see page 101

    brazov2

    Visitor II
    November 10, 2010
    Posted on November 10, 2010 at 20:19

    Hi Brazov,

    Thank you I go to try it.

    Where are you from?