Shop OBEX P1 Docs P2 Docs Learn Events
INTERRUPT_RTCC2.SXB question — Parallax Forums

INTERRUPT_RTCC2.SXB question

RsadeikaRsadeika Posts: 3,837
edited 2006-09-14 19:11 in General Discussion
I am considering modifying the program to run at an interrupt rate of returnint 104, so this value slows the interrupt down to 26 uS. Now, in order to make the program work, do I change the B19K2 CON 4 to B19K2 CON 8. My thinking is, if you slow the interrupt down , you have to increase the sampling rate. Is this a correct assumption? I would like to have this program work at returnint 104, but I am not sure what is really involved.

Any ideas?

Thanks

Ray

Comments

  • BeanBean Posts: 8,129
    edited 2006-09-14 18:07
    If you half the interrupt rate, you need to half the sample period. So you would need to change "B19K2 CON 4" to "B19K2 CON 2". And two sample periods might not be enough to get reliable data.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    There are only two guaranteed ways to become weathy.
    Spend less than you make.
    Make more than you spend.
    ·
  • RsadeikaRsadeika Posts: 3,837
    edited 2006-09-14 19:11
    Thanks Bean,

    So, if I use a 9600 baud selection, the B9600 con 8 would be B9600 con 4, which would be the same value as the original B19K2 con, so that should do the trick, right? And, I guess I would have to change tht BitTm, and BitTm15 values to the new baud rate. I guess in these types of examples it would be nice if their were two, one at one baud rate, and the other at a different baud rate. That way I guess one could look at the code and see what is changing at the different baud rates, and in the end learn some general concepts about serial coding.

    Thanks

    Ray
Sign In or Register to comment.