Search Engine www.edaboard.com

rs485 Code

Add Question

83 Threads found on edaboard.com: rs485 Code
hi friends! i wanted to implement rs485 communication b/w an avr and a pc.. the reason being distance up to 50 m b/w the two.. i am using the max485 ic, being the first time for such project wanted help and guidence.. i have a rs232-485 converter that i am going to use. as far as my thw knowledge i have upto now is that aprt from being half dupl
I want to do a rs485 network, based in SNAP protocol with PIC'S 16F84A. If somebody know could help with information, I'm agree. Thanks
Hi, Can any body explain "turn-around delay" in rs485 Half duplex communication. How to take care of this delay. Thank you Itp
rs485_RX.bas '*************************************************** '***** mbyka - (c) Copyright 2002 ********** '*************************************************** ' rs485 comminications 'TX include "modedefs.bas" datap var porta.0 dir var porta.1 'dir=1 then output, dir=0 then input led1 var portb.0 led2
Small (512 words total, about 100 words of free space) Powerful Hard-coded ?Via Comm? Bootloader For Interfaced ATMEL ATmega Devices, With Full Memory, Lock Bits & Fuses Accessing And Testing Ability, Supported From Application ?MegaCipher-Server PRO? And C++ Class ?MegaCipher? (source code). FREE test
Hi, I'm working now on designing a control network over rs485 I have three questions 1-I'll use max3082E or max3060E (half duplex, 1/8unit load, slew rate limited, 15kv protection, 5v). any one here has a good or bad experience with this chip? 2-I want to distribute power over rs485, how can this be done ? 3-How rs485 repeater (...)
Hi, Much simplier to use a 16F628 or similar with built in USART and use an rs485 transceiver like MAX487. Than all u have to do is send and receive with the USART and control the direction with MAX's T/R pin (Transmit/Receive). Zed
Hi, I must connect three united with protocol master\slave have any example code function, for the serial comunication in 8051 whit the rs485 protocol?
eidtechm, that means your problem lies in your program. If you do not trust your rs485 line driver - get a 2 PC and put 2 converters in duplex mode then check the communication by hyperterminal or similar .
Could anyone give me a link of an rs485 sample protocol implemented in C.
realizes sensor-to-host signal acquisition for testing analog signal or remote applications. Software-configurable for a wide variety of sensor types, including: analog input, analog output, and digital I/O,ISO40xx series are widely used in RS-232/485 automation control system,temperature signal testing,small signal testing, Monitoring & Control, r
Hi Are you looking for full duplex rs485 or half duplex? for half duplex network use MAX485 as drivers & receivers to interface the network from the hardware point of view use 1 I/O line from the PIC as the Tx & RX select line for the MAX485 transceivers and PIC uart TX for & PIC uart RX for RX All slave in the network must be in
Hi, Yes, it's an RS232 echo app. For rs485, I suggest you use mikroC as it has the internal library. I've not done the rs485 myself, but shouldn't be very difficult with the library. Tahmid.
Hi , I was communicating with master slave concept for rs485. If i communicate with the one master and one slave it is woking good . But if i connect one master and two slaves , the second slave gets hanged, i.e display displays some wrong character.I had connected the second slave as only hardware(no query is sent to it from master
Project : controlling 8 PIC16F877A through PC via rs485 sending and receiving through PC Rs232. Problem: On rs485 data transfer between master and slave controllers are perfect but now i want to send data from terminal via RS232 comport to master and try to pass on this code to slaves one, and result send back on to master then t
Hi, I need to know if it is possible to broadcast the data of master microcontroller to all microcontrollers connected on bus using rs485? Or it is limited to one address at a time? Thank you
in case of rs485 u have to control RE,DE pin. all you have to do join both pin and connect to PIC pin. in normal mode RE,DE = 0 that time u are in RX mode. in case of transmit the data make RE,DE=1 send your data and get back in to RX mode ie. RE,DE=0 Regards.
hi friends.. i have a circuit on Pcb, for rs 485 and am using avr atmega8, now when i make the power on and conncet the rs485 to pc using rs485-rs232 converter using hyper terminal i get this error "cannot open COM Port3 check port settings" now when the power is removed this msg is not displayed, moreover if just avr is removed fro
regards i am using a rs 485 communication and befor switching the enable line thats on PC5 i have to check so that a current operation (recieve transmit doent affect) for swithing from transmit to recive i have to check TXC flag and i implement that as follw while ((UCSR0A & (1 << TXC)) == 0){}; PORTC&=~0x20; // start recieving
Hi all, How to implement rs485 communication between PC and PIC micro controller. I have used MAX485 to convert RX and TX signal to D+ and D-. In PC side rs485 to RS232 converter is used. I think the hardware part is ok.. How to write a C code for communication between microcontroller and PIC . #include #include
Regards All! i am tring to make a simple circuit that has ds1820 thats interfaced to atmega8, and atmega8 has a rs485 interface with pc. i have the circuit as shown in attached pdf, sensor is fine and transmit is also fine , i am having problems with rx, the circuit should give the temperature when it resscieves the character 's' but it dosen
MAX485 is convert UART to rs485. So, the programming is easy still use UART. Only, MAX485 need 1 more control RE/DE for either transmit or receive. If 1 part is transmitting, all other part must receiving.
Hello I intend to make a master / slave rs485 communication between 2 pic micros. I found a example about how to make this in mikroE compiler help, then I edited few lines in it to suit my application. The problem that the micros do not perform the supposed logic of the code. Master code: char dat; // buffer fo
Hello, I need to estimate the code size of my project to decide upon MCU to be used. At present moment I have following inputs about the project 1. 128x64 LCD for display. 2. Temperature sensor interface using MCU ADC. 3. one external intr triggering circuit. 4. Transfer the data using rs485. 5. three key keypad to configure setting.
I think RS232 and rs485 coding is not the same, because when coding for rs485, you should manually switch between the transmitter mode and receiver mode by setting relevant signal lines. if you want to communicate multiple MCUs utilizing rs485, you can take a look at MODBUS. Hope it will help you.
i just wondering if it's possible to connect pic18f to computer usb ... first by using usb to rs485 converter then using max485 .. then interfacing it to microcontroller uart >>> what terminal program do i need .. i also have mikroc
Hello, I have a slave card with a ultrasounds detector which work on Uart2 and MAX485 on Uart1 to share data on rs485Bus. - rs485 Bus work well when i use only Uart1 in my code. - Ultrasounds detector SRF02 work well when i use only Uart2 in my code. I want share distance mesurement on my rs485 Bus. (...)
Hello, I' using MikroC example of code for rs485 communication between one Master and one Slave. It's work well. However, i'm trying now with two Slaves, One Master and i have problem. After serveral secondes (between 2seconds and 10seconds), i enter in my error if() on Master. if (dat) { UART_Set_Active(&UART2_Read, &UAR
I want to make a communication MASTER (PC) - SLAVE (ATMEGA2560) using rs485. I want the MASTER to send a data of 8 bytes, on the SLAVE , i need use bascom-avr Can anyone help me with some sample code ? Thanks in advance.
hello, i am trying to interface an rs485 chip to my 8051 controller, this is the tesing circuit i have made 73836 i have problem communicating between 8051 and pc through this is my schematic J1 and J2 jumpers are connected only when programming the cable length between max 485s is mot even 10cm the program i h
I have a problem in serial communication between At89s52 micro controllers. I thought to use rs485 for connecting more devices in network. for testing I connect two controller alone. I assume one as a master and another as slave. If I initiate transmission from master it reaches slave correctly. And when I write a code for slave to response maste
Hi, Ive got a USB to rs485 converter for PC and trying to communicate with PIC16f887. I am trying to simulate in Proteus, Here is my Schematic: 77535 Here is my code unsigned char ch; void InitUsart(void) { // TX Pin - output TRISC=0b01000000; TRISD=0b00000000; PORTD=
for rs485 communication between control and ballot unit i m using Sn75176 between two pic18f452
i have a problem in rs485 communication with keyboard as the i/p (ps2) ...the o/p i get has a great delay...i use it to run h bridge...motors take about 3- 5 seconds running after i remove the i/p from the keyboard and sometimes there is no delay at stops immideatly if i push the last button again...this is the code on mikroc ,i am using
hi i am using atmel microcontroller use of code vision avr + proteus . i am going to use rs485 protocol. so i need the coding for that, any one give me that? thanks
I need help to creat a code(.asm) for communication between multiple microcontrollers using rs485.So,pls help me with some sampule code (Using At89s51/52)
hello, rs485 dose not matters on the code. set the budrate same for both the muc .
Can you give the function definition too: UART1_Init(9600); // initialize UART1 module rs485Slave_Init(160); // Intialize MCU as slave, address 160 rs485Slave_Receive(dat); Also try to make TRISC6_bit = 1;
Hi The Linux Home Automation project is a bit of a misnomer. It's really meant for use under any Unix like operating system. We already have one gentleman who uses QNX so he'll keep me honest. :wink: I fully intend to keep the source code as portable as possible. And I'm working on getting a *BSD system up and running real soon. The initial inte
What voltages does rs485 run at?
Ever considered using rs485 on a low cost twisted pair or even on a telephone wire that you already have installed. You cant beat the cost / performance ratio.
Actually, you may need rs485 instead. RS232, RS422 is peer-to-peer rs485 can do master-slave communication with 2-3 wires.
Hi all, may i know how to make TCP/IP protocol using uC? is it possible? I planned to store my MAC address in my ROM because i don't want to connect it to internet .i think i can make some uc network using switch ..... So may i know the frame data etc and of course the physical (Did they used rs485? protocol) Thanks a lot for your comment Bes
most compilers have extenssions to 'pipe' serial data to ordinary i/os and also to from the uart or use two pic's {pic 508/9 springs to mind} or as above if speed is an issue then use a dual uart one ... if your just reading data use the software uart approch you can make the code and compile it fully using the free demo compiler
Practical (Mostly) PIC projects Here's my list of current PIC projects on my web site , currently only the schematics are posted but I will post descriptions and source code asap. Armadillo: (iButton Door Lock) Preview, Incomplete PIC 16F87 or 16F628A based iButton, keypad and remote contro
The key factor in the successfull RS232-to-rs485 conversion is in the correct switching between transmission and reception .. If you can't use RTS signal to control the DE-/RE pins than the whole idea of using MAX232 and MAX485 (including option with MOSFET transistor) won't work .. Here is another (working!!!) option:
The PIC has a built in feature to handle this. Look at the datasheet and the USART section. In particular look at the 9 bit mode. You would need to use rs485 multidrop communication. The 9th bit is used to tell the slaves that an address is on the bus. This method allows only one master.
Are you sure you know the difference between synchronous and asynchronous serial modes? Are you hooking this up to RS232, RS422 or rs485?
Apologies for the "me too" post but I am also looking for it. Apollo is described as an "open protocol" but the documentation does not seem to be available. Probably have to sign an NDA to get it. All I know so far is that it is rs485. Might just have to monitor the bus and use a protocol analyser to figure out it out.
My Junebug kit can be setup for rs485 with an external SN75176 and PCB. So can my new Wasp kit.