On 2010-7-16 19:38, Sébastien Lorquet wrote:
No. Only the write access was obviously a giant breach. Giving a read
access is totally normal and is what all open source projects do. When
someone has something to write, he can send you a patch against a
known svn revision. Then you can import the patch by yourself, and
make contributors' work visible, while retaining full control on your
server.
Ok, it's done. I deem it's going far away from uCsim topic.
I have copied some serial communication examples from MCS-51 course
books, build them using SDCC, and simulating the same way for both plain
files and /dev/tty. None works. Both tty and plain files are losing frames.
The testing command line:
s51 -tC52 -S in=/dev/tty1,out=/dev/tty1 rs232_example_m.ihx
s51 -tC52 -S in=testdata.in,out=/dev/tty1 rs232_example_m.ihx
Thanks,
Lenik
The example is included in the attachment.
/***********************************************************************************
* æ é¢: RS232串å£éä¿¡è¯éª(æ¥åä¸åé)
*
*
*
* 1.éè¿æ¬ä¾ç¨äºè§£ä¸²å£çåºæ¬åçå使ç¨
,çè§£å¹¶ææ¡å¯¹ä¸²å£è¿è¡åå§å *
*
*
* 2.请使ç¨ä¸²å£è°è¯å©æï¼Baud
4800ãæ°æ®ä½8ã忢ä½1ãæéªä½æ ï¼å为ä¸ä½æºæ¥åæ¶åè¯éªã
*
å¨è°è¯å©æå符串è¾å
¥æ¡ä¸è¾å
¥æ°åååç¬¦ï¼æåéæé®ï¼ç¶åè§å¯æ¥åçªå£çååãä¹å¯ä»¥ç¨
* è°è¯å©æèªå¨å¾ªç¯åéã
*
*
*
* 请å¦åè®¤çæ¶åæ¬ä¾ç¨ï¼å¦ä¼ç¨Cè¯è¨æä½ä¸²å£
*
*************************************************************************************/
#include <8052.H>
char Flag;
unsigned int ReData, SenData;
void main(void) {
SCON = 0x50; //REN=1å
è®¸ä¸²è¡æ¥åç¶æï¼ä¸²å£å·¥ä½æ¨¡å¼1
TMOD |= 0x20; //宿¶å¨å·¥ä½æ¹å¼2
PCON |= 0x80;
//TH1 = 0xFD; //baud*2 /* reload value
19200ãæ°æ®ä½8ã忢ä½1ãæéªä½æ (11.0592)
TH1 = 0xF3; // //baud*2 /*
æ³¢ç¹ç4800ãæ°æ®ä½8ã忢ä½1ãæéªä½æ (12M)
TL1 = 0xF3;
TR1 = 1;
ES = 1; //å¼ä¸²å£ä¸æ
EA = 1; // 弿»ä¸æ
// IE = 0x0;
while (1) {
if (Flag == 1) {
SBUF = SenData; //SBUFæ¥å/åéç¼å²å¨
while (TI == 0)
;
TI = 0;
Flag = 0;
}
}
}
/****************************************************
串å£ä¸æç¨åº
******************************************************/
void ser_int(void)
__interrupt 4 __using 1
{
if(RI == 1) //RIæ¥å䏿æ å¿
{
RI = 0; //æ¸
é¤RIæ¥å䏿æ å¿
ReData = SBUF; //SUBFæ¥å/åéç¼å²å¨
SenData=ReData;
Flag=1;
}
}
:0400000002002B329D
:01000B0032C2
:0100130032BA
:01001B0032B2
:030023000200B226
:0300840002002651
:0500260012008780FEBE
:0E008700759850438920438780758DF3758BE3
:07009500F3D28ED2ACD2AF12
:0A009C007800E2B401FA7803E2F5FF
:0100A60099C0
:0500A70010990280FB2E
:0600AC007800E4F280EA96
:0C00B200C0E0C0D075D008109802801784
:0C00BE00AA997B007801EAF208EBF278C6
:0A00CA0003EAF208EBF2780074017B
:0100D400F239
:0500D500D0D0D0E032A4
:06005A00E478FFF6D8FD7A
:080038007900E94400601B7A25
:05004000009000DE78D5
:030045000575A09E
:0A00480000E493F2A308B8000205DB
:08005200A0D9F4DAF275A0FF59
:080060007805E84400600A790C
:030068000075A080
:06006B0000E4F309D8FCDB
:080071007800E84400600C79FE
:0B00790000900005E4F0A3D8FCD9FAC9
:03002B0075810FCD
:0A002E001200DAE5826003020026EA
:0400DA007582002209
:00000001FF
hello, world
0123456789012345678900123456789001234567890012345678900123456789001234567890
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user