SWCOM - HWCOM Kategorie: Progr. Assembler, TaskingTools, OS (von Herve - 30.01.2006 18:25) | ||
Als Antwort auf Re: Serielle Schnittstelle von André H. - 9.10.2005 11:40 | ||
| ||
Hi! My german is too poor, so can I make it in english? I want to use both hwcom and swcom on a CC2 controler with the development board. I directly connected TxD and RxD and ground for HWCOM without using the null modem cable. For swcom: I connected P1H2 on digital RTS. I connected P1H1 on digital CTS. I connected RxD of the PC on SWCOM TxD. I connected TxD of the PC on SWCOM RxD. I connected pin 5 on PC (ground) to the ground of the CC2. I used in both case shielded cable. I am using OS v3.0 and the SP2 2.13. I can use the COM2 (hwcom) to flash the memory of the CC2, and COM1 (SWCOM) works. But when I plug both serial port (com1 and com2 to swcom and hwcom respectively) and run the program, it hangs. I have to unplug SWCOM (com1) to see the output coming to the terminal (hwcom). What can I do to have both port working simultaneously? What did I do wrong? Here's the code: thread main{ int k; string s; swcom.init(); hwcom.init(); hwcom.setspeed(hwcom.SPEED_57600);; // 8: 57600 BPS swcom.setspeed(swcom.SPEED_9600); // 5: 9600 BPS hwcom.clr(); swcom.clr(); for k=1...2000{ s= "HWCOM"; hwcom.send(s, str.length(s)); s= "SWCOM"; swcom.send(s, str.length(s)); } } Also, thank you very much for your tremendous work on the CC2. Herve Herve.Remigy@unibas.ch | ||
Antwort schreiben Antworten: Re: SWCOM - HWCOM (von Herve - 31.01.2006 21:12) |