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

Parents
  • As Per says, it's not a matter of etiquette - it's simply providing sufficient information to enable people to know what you're talking about and, hence, make relevant replies.

    Remember: anyone reading your post knows absolutely nothing about you or your project - other than what you state explicitly in the post.

    "The chip I use is the Dallas DS87C530"

    Have you read its Datasheet?
    Have you read the other Application Notes, guides, etc, available on the Maxim (formerly Dallas) website?

    "I have now tried every combination of code and still it does not work."

    Clearly, you can't have tried every combination - you haven't found the one(s) that work yet!

    Did you start with the basic "Hello World" sample?
    Have you worked-through the examples to gain familiarity with the tools?

    http://www.keil.com/support/man/docs/uv3/uv3_examples.htm

    Did you use the Keil-supplied header file for this chip?
    See: http://www.keil.com/dd/chip/2979.htm

    Did you use the Keil-supplied startup code for this chip?

    Are you using a commercial board based on this chip? If so, have you checked its documentation and the supplier's support site for hints, tips, examples, etc?

Reply
  • As Per says, it's not a matter of etiquette - it's simply providing sufficient information to enable people to know what you're talking about and, hence, make relevant replies.

    Remember: anyone reading your post knows absolutely nothing about you or your project - other than what you state explicitly in the post.

    "The chip I use is the Dallas DS87C530"

    Have you read its Datasheet?
    Have you read the other Application Notes, guides, etc, available on the Maxim (formerly Dallas) website?

    "I have now tried every combination of code and still it does not work."

    Clearly, you can't have tried every combination - you haven't found the one(s) that work yet!

    Did you start with the basic "Hello World" sample?
    Have you worked-through the examples to gain familiarity with the tools?

    http://www.keil.com/support/man/docs/uv3/uv3_examples.htm

    Did you use the Keil-supplied header file for this chip?
    See: http://www.keil.com/dd/chip/2979.htm

    Did you use the Keil-supplied startup code for this chip?

    Are you using a commercial board based on this chip? If so, have you checked its documentation and the supplier's support site for hints, tips, examples, etc?

Children
No data