View Full Version : serial input and 803-h6
tommyjt24
09-23-04, 08:19 AM
Heres the scoop, I have a program running. (basiclly cycling the lights off and on). I then have an interupt setup when input comes in to echo the char back to term. (all setup with code warrior) When I run the program lets say from term and send it one character at a time the program runs fine. Also when I hold a key down it works fine. When I try pasting a string or running a VB program to control the serial output the program locks and I have to reset the board. I think its because the VB and Paste commands send the data to fast for the board to handle and input it. Any clues as to how to fix this? I need to have a constant flow of data. it does not have to be super fast but something around a constant 20-30 bytes of input per second.
petegray
09-23-04, 12:26 PM
As you're using Code Warrior, run the program and when it fails, hit the "break" button. Examining the call stack, memory and the SCI status register should give you a good indication of the problem cause.
tommyjt24
09-23-04, 01:50 PM
as far as I'm guessing the transmit is throughing up an interupt when it recieves the data and returns it. Is there a way to set up the interupt so it does not through an interupt up when there is data waiting to send? I'm sure i just have it set up wrong at this time unless filling the output buffer would cause a deadlock?
tom
petegray
09-23-04, 02:31 PM
I think the SCI TX and RX interrupts use different vectors *and* you turn each of them on/off independently. Check out the SCI section of Motorola's User / Family Manual for the DSP56F80x for complete details.
tommyjt24
10-06-04, 09:27 AM
Now that I am beyond the problems I had earlier I am having a problem with sending strings across still. Is the H6 capable of receiving strings? I am getting a buffer over run flag.. on SCI0SR when I check the registers afterwards. I get the first character of the string so I would have to say its something to do with making the buffer on the board/software bigger. Any way of making the buffer take in more then one character at a time? Other tips will also be nice on getting a string to my board. Would changing the
definition of SCI0DR from short to long make the buffer bigger?
thanks,
tom
petegray
10-06-04, 12:51 PM
tom,
you'd typically see buffer overruns when a program / routine doesn't process a received character quickly enough (i.e. read it from the SCI data register). Make sure your interrupt routine is as short as possible, and / or consider using a circular buffer technique.
-Pete.
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.