On Fri, 16 Jul 2010, 谢继雷 wrote: > and I want to know if there is some options to control the simulated > serial line's baud to S51 simulator.
Obviously there is no such option. Baud rate is controlled by SFRs of timer and uart. Simulator counts ticks and when all necessary bits are "received" it reads in one byte from the input file and makes availabe as content of UART's data register. > s51 -tC52 -S in=testdata.in,out=testdata.out commtest_m.ihx > > In this example, the serial input from file testdata.in is sent to S51 > too fast, and many frames are lost. When the serial input from /dev/tty > (user keyboard) does work well. You should check if your main is fast enough to process continous data, or check sync of main and ISRs. You can place breakpoint at serial ISR and check if it happens at expected time (check receive only case without sending). Or provide me values of SRFs (or source code of a stripped down example), and I'll try to check if there is a simulator bug. Daniel ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user