ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Пятница
26 июля
140781
Porodox (02.12.2008 09:19, просмотров: 530) MBedder
Вопрос по EM1000-EV(Tibbo) На устройстве установлено 4 RS-232 порта. В прошивке, настройки устанавливаются одинаковые для всех портов. Однако, данные не передаются по 2-ой паре портов. Как правильно настроить 2 пару портов на передачу данных? Спасибо. Код прошивки: { dim i as integer dim MaxVal as integer MaxVal=ser.numofports for i = 0 to MaxVal-1 ser.num=i 'don't really have to do it- we only have a single serial port ser.rxbuffrq(4)'we ask for 4*256-16=1008 bytes for the RX buffer of the serial port ser.txbuffrq(4)'we ask for 4*256-16=1008 bytes for the TX buffer of the serial port 'Serial port also needs setup (we leave parity and bits/word at default- NO and 8) ser.parity = PL_SER_PR_NONE ser.bits = PL_SER_BB_8 ser.flowcontrol = DISABLED ser.baudrate = set_baud(5)'ser.div9600/4 '38400bps ser.interface = PL_SER_SI_FULLDUPLEX ser.esctype = PL_SER_ET_DISABLED ser.interchardelay = 0 next i sys.buffalloc for i = 0 to MaxVal-1 ser.num =i ser.enabled= YES next i }