Difference between revisions of "User:JanosA"
From ArmadeusWiki
m (→Skills) |
|||
Line 15: | Line 15: | ||
* Datacenter temperature monitoring, with RS-485 and OneWire communications. | * Datacenter temperature monitoring, with RS-485 and OneWire communications. | ||
* Data logger for Saia Sbus based intelligent power meters. | * Data logger for Saia Sbus based intelligent power meters. | ||
+ | |||
+ | |||
+ | == RS485 == | ||
+ | Mini HOWTOs for my APF28/iMX28 mxs-auart and busybox stty patches. | ||
+ | |||
+ | * Setup APF28 serial port for RS485 communication: | ||
+ | <pre class=apf> | ||
+ | # stty -F /dev/ttySP0 raw | ||
+ | # stty -F /dev/ttySP0 -echo -echoe -echok | ||
+ | # stty -F /dev/ttySP0 rs485 | ||
+ | </pre> | ||
+ | |||
+ | * Set extra delays for TXEN/RTS signaling before and after the transmitted packet (in microseconds): | ||
+ | <pre class=apf> | ||
+ | # stty -F /dev/ttySP0 rs485delaybefore 100 | ||
+ | # stty -F /dev/ttySP0 rs485delayafter 100 | ||
+ | </pre> | ||
+ | |||
+ | * To get current RS485 parameters. (If the port device supports the RS485 options you will see the last two lines) | ||
+ | <pre class=apf> | ||
+ | # stty -F /dev/ttySP0 | ||
+ | speed 9600 baud; line = 0; | ||
+ | intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; | ||
+ | eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; | ||
+ | werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; | ||
+ | -brkint -imaxbel | ||
+ | rs485 -rs485rtsonsend -rs485rtsaftersend -rs485rxduringtx | ||
+ | rs485delaybefore = 100; rs485delayafter = 100; rs485delaylastchartx = 1250; | ||
+ | </pre> | ||
+ | Please note: | ||
+ | * You can't set the "rs485delaylastchartx" parameter, it's calculated automatically from the baudrate. | ||
+ | Special notes only for APF28/iMX28 mxs-auart driver: | ||
+ | * All delays are in microseconds. | ||
+ | * The "rs485delaylastchartx" parameter is not used in DMA mode. | ||
+ | * The parameters: "rs485rtsonsend" "rs485rtsaftersend" "rs485rxduringtx" are not used. |
Revision as of 22:04, 6 May 2013
I am IP Network and Datacenter engineer, currently I'm working for an Internet Service Provider in Hungary.
My hobby is programming embedded systems and creating my own small electronic boards.
Skills
- Assembly programming: PIC 8bit family
- C programming: PIC 8bit / PIC32MX family, Linux
- Perl, PHP, Javascript, Html programming with MySQL
- Linux system administration
- RS-232/485 serial communications: Ascii, Modbus, Saia Sbus, etc.
- IP networking
My ArmadeuS plans (APF28 based)
- Creating an universal home automation hardware for my friends, with easy programming in perl or PHP. :)
- Datacenter temperature monitoring, with RS-485 and OneWire communications.
- Data logger for Saia Sbus based intelligent power meters.
RS485
Mini HOWTOs for my APF28/iMX28 mxs-auart and busybox stty patches.
- Setup APF28 serial port for RS485 communication:
# stty -F /dev/ttySP0 raw # stty -F /dev/ttySP0 -echo -echoe -echok # stty -F /dev/ttySP0 rs485
- Set extra delays for TXEN/RTS signaling before and after the transmitted packet (in microseconds):
# stty -F /dev/ttySP0 rs485delaybefore 100 # stty -F /dev/ttySP0 rs485delayafter 100
- To get current RS485 parameters. (If the port device supports the RS485 options you will see the last two lines)
# stty -F /dev/ttySP0 speed 9600 baud; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -brkint -imaxbel rs485 -rs485rtsonsend -rs485rtsaftersend -rs485rxduringtx rs485delaybefore = 100; rs485delayafter = 100; rs485delaylastchartx = 1250;
Please note:
- You can't set the "rs485delaylastchartx" parameter, it's calculated automatically from the baudrate.
Special notes only for APF28/iMX28 mxs-auart driver:
- All delays are in microseconds.
- The "rs485delaylastchartx" parameter is not used in DMA mode.
- The parameters: "rs485rtsonsend" "rs485rtsaftersend" "rs485rxduringtx" are not used.