cancel
Showing results for 
Search instead for 
Did you mean: 

I/O PORTS

infoinfo967
Associate II
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
2 REPLIES 2
brazov22
Associate II
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

infoinfo967
Associate II
Posted on November 10, 2010 at 20:19

Hi Brazov,

Thank you I go to try it.

Where are you from?