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

Baud Rate

Hi Does anyone know this
In the Peripherals->Serial Window, it displays a baudrate. If I am setting TMOD.6 to 1, another word using t1 pin to clock timer1 instead of the cystal, will that window still display the right result. Is there a easy way to simulate another clock going to t1 pin and specified its freq? Thanks

  • If I am setting TMOD.6 to 1, another word using t1 pin to clock timer1 instead of the cystal, will that window still display the right result.

    I'm pretty sure the answer here is no.

    Is there a easy way to simulate another clock going to t1 pin and specified its freq?

    Yes. Create a signal function that toggles the T1 input and then delays for some time (1/2 the cycle). For example:

    signal void t1_input (void) {
    while (1) {
      swatch (0.001);     /* wait 1ms */
      PORT3 ^= (1 << 5);  /* toggle T1 input */
      }
    }

    Note that I haven't tested this signal function.

    Jon