Skip to main content
Visitor II
June 7, 2004
Question

Simple Question! Helping a newbie!

  • June 7, 2004
  • 2 replies
  • 579 views
Posted on June 07, 2004 at 09:25

Simple Question! Helping a newbie!

    This topic has been closed for replies.

    2 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:01

    HI!

    I've got a simple question! I think it's easy to solve!

    sorry! but how could i, for example set a port with using C-code! It's very easy to use PSD Express. But, if i want to write it C what must i do?

    for example set the Port PB0 to high!!!!

    i know, i have to include uspd3200.h and then?

    .....

    I hope you're not feeling bothered about posting such a topic! But there isn't anybody else nearby, who i can ask!

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:01

    Try the following:

    xdata PSD_REGS PSD8xx_reg _at_ PSD_REG_ADDR;

    PSD8xx_reg.DIRECTION_B |= 0x01; // set to output

    PSD8xx_reg.DATAOUT_B |= 0x01; // set PB0 high

    Regards

    sjo