This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

code question

Hello,

I am making a project where I need to use 14 outputs. I choose for that the entire Port 1 pins, P3.2, P3.3, P4.4, P4.5, P4.6 and P4.7. But I have a problem with that last four. They are part of the Port 4 and can function as general I/O or in its alternate function as address pins A16, A17, A18, and A19. Here is where my problem is. I can’t configure them to work as I/Os. I have read about configuring that in an assembler source called startup.a51 by the SFR registers P4CNT, P5CNT, P6CNT, MCON and MCON1. I have found different versions of that source file and tried a lot of different combinations in that registers, but I don't achieve what I want.

For all that, I would be very grateful if someone can explain me how to do it or can reply me with an example of the startup file configured correctly.

Best regards,

Gorka

0