Skip to main content
Visitor II
February 20, 2004
Question

Please help, interrupt cannot work properly.

  • February 20, 2004
  • 3 replies
  • 751 views
Posted on February 20, 2004 at 01:54

Please help, interrupt cannot work properly.

    This topic has been closed for replies.

    3 replies

    alanlai1Author
    Visitor II
    February 16, 2004
    Posted on February 17, 2004 at 00:20

    We have written a small program which generate square wave by interrupt (toggle, 2ms Hi, 2ms Lo)

    But we found that the width is not accuracy.

    Does anyone meet this problem before?

    How can we solve this? Please suggest.

    ________________

    Attachments :

    timer.asm : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I043&d=%2Fa%2F0X0000000bVM%2F3LbSrNSIXvL9ZF7DTKMrjaFR.ldsxW4lUBkwbPD9e1g&asPdf=false
    Visitor II
    February 18, 2004
    Posted on February 18, 2004 at 13:35

    Hi,

    can you specify what SW and HW are you using?

    Visitor II
    February 20, 2004
    Posted on February 20, 2004 at 01:54

    Please check the following points;

    1// In your software, You have a mixed configuration for the PortB(some i/o's in I/P and some are in O/P). Do not use bset/bres instructions for this port. To toggle the port pin use OR/AND instructions.

    2// Ensure that, the cpu frequency is 8Mhz.