Strange Characters

Store Forums Video Experimenter Bugs/Problems Strange Characters

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #624
    Pnotion
    Member

    Whenever I try to display characters on the screen not all of them will show up. Instead they are replaced by strange characters like in the provided picture. I have also provided the code that I am using to write the ttext to the screen. Any help would be appreciated.


    #include
    #include
    #include

    #define W 136
    #define H 96

    TVout tv;
    pollserial pserial;
    char saveChar;
    int index = 0;




    void setup() {
    tv.begin(NTSC, W, H);
    initOverlay();
    tv.select_font(font6x8);
    tv.fill(0);
    randomSeed(analogRead(0));
    tv.set_hbi_hook(pserial.begin(57600));


    }

    // Initialize ATMega registers for video overlay capability.
    // Must be called after tv.begin().
    void initOverlay() {
    TCCR1A = 0;
    // Enable timer1. ICES0 is set to 0 for falling edge detection on input capture pin.
    TCCR1B = _BV(CS10);

    // Enable input capture interrupt
    TIMSK1 |= _BV(ICIE1);

    // Enable external interrupt INT0 on pin 2 with falling edge.
    EIMSK = _BV(INT0);
    EICRA = _BV(ISC11);
    }

    // Required to reset the scan line when the vertical sync occurs
    ISR(INT0_vect) {
    display.scanLine = 0;
    }



    void loop() {
    if (pserial.available()) {
    tv.print((char)pserial.read());
    }
    }
    #1696
    Michael
    Keymaster

    Are you sure you have the serial speed set to the same value on sender and receiver?

    #1691
    Pnotion
    Member

    Yes they are both at 57600.

    #1704
    Pnotion
    Member

    Is this not right should the baud rate be set to something different?

    #1705
    Michael
    Keymaster

    Just keep trying different things. How about slowing down your loop() function with some delay? Or try slower or faster serial speeds.

    #1706
    Pnotion
    Member

    Lowering the baud rate seems to have solved the problem thanks.

    #1707
    Michael
    Keymaster

    that’s great!

    #1762
    john
    Member

    try tv.set_hbi_hook(pserial.begin(115200));

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.