-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LIN transceiver #2
Comments
Yes, I used the ATA6663: http://www.atmel.com/images/atmel-9146-lin-networking-ata6663-ata6664_datasheet.pdf You absolutely need a transceiver to communicate with LIN devices (unless of course your uP has an integrated transceiver)... I do not think that the transceiver chip would affect the checksum though (or any other bits). AFAIK it just handles the electrical issues |
Thank you for the information. Follow up question, my LIN device operates
|
yes look as section 3 (Absolute Maximum Ratings) of On Mon, Mar 14, 2016 at 3:19 PM, Pinguinsan [email protected]
|
Sorry to revive this old thread, but the ATTiny167 appears to be a rare AVR 8-bit chip that supports a LIN controller on the UART pins. Since there exists a port of the Arduino libraries for the ATTiny line, this would eliminate then need for an external LIN transceiver, right? I apologize for the basic questions. EDIT: Nevermind, I have found the answers to my questions. The answer is NO, the ATTiny does not have a built in LIN transceiver. This software repository is a software implementation of a LIN master MCU, that MUST communicate via TTL serial levels (pins 0 and 1 on the Arduino UNO, or any other UART - The Arduino Mega has 4 of them) to a dedicated LIN transceiver. The one I've found that is the easiest to "breadboard" is the MCP2003/4-A series (http://www.microchip.com/wwwproducts/en/MCP2004A). So, you will communicate with a LIN transceiver IC using the software gandrewstone has written over a dedicated TTL serial port (as I mentioned, pins 0 and 1 for the Uno, or any other UART), and you will attach your LIN bus (LIN only uses 1 pin for data, and 1 pin for GND) to the LIN transceiver. |
I'm trying to make this LIN communication work and I could really use some guidance. I want to use an ATmega2560 as a master and have multiple Atmega328p for slaves. I could really use some help understanding how to implement this code and what to change for the master and slave devices. Any help would be very much appreciated, Thanks in advance. |
I'm trying to use this project with this Lin board and an arduino UNO. |
@ghislaingautier that should be compatible; I have a similar project using the MCP2003B and an Arduino Uno that was originally based on this library: https://github.com/trainman419/bekant |
@trainman419 do you know how i must use your libary to connect two of these boards https://copperhilltech.com/lin-bus-breakout-board/ with an Arduino Mega2560 one as slave and the other as master and then the master should say "hello" to the slave so that i can read it from the Arduino |
@philipk25 sorry; this project and my project only implements the LIN master. |
@trainman419 do you know a libary for a lin slave to use on this breakout board? |
Hello, do I need to use a LIN transceiver (for example this one http://www.atmel.com/images/atmel-4916-lin-networking-ata6662c_datasheet.pdf ) with your library? I want to generate LIN 2.0 master frame with 8 bytes of data. I used your library to do that, my code looks like this:
void loop() {
uint8_t cmd1[] = { 0x47, 0x20, 0xF8, 0x73, 0x00, 0x00, 0xCF, 0xFF};
uint8_t cmd2[] = { 0x44, 0x10, 0xF0, 0x73, 0x00, 0x00, 0xCF, 0xFF};
uint8_t cmd3[] = { 0x23, 0xF0, 0xF0, 0x73, 0x00, 0x00, 0xCF, 0xFF};
uint8_t cmd4[] = { 0x5d, 0x47, 0xF0, 0x73, 0x00, 0x00, 0xCF, 0xFF};
uint8_t cmd5[] = { 0xE4, 0xD0, 0xF0, 0x73, 0x00, 0x00, 0xCF, 0xFF};
uint8_t cmd6[] = { 0x42, 0xE1, 0xF2, 0x73, 0x00, 0x00, 0xCF, 0xFF};
lin.send(0x30, cmd1,8,2);
delay(70);
lin.send(0x32, cmd2,8,2);
delay(70);
lin.send(0x33, cmd3,8,2);
delay(70);
lin.send(0x35, cmd4,8,2);
delay(70);
lin.send(0x36, cmd5,8,2);
delay(70);
lin.send(0x37, cmd6,8,2);
delay(70);
}
when i look at the TX through my saleae analyzer i see that data bytes are okay but there is something wrong with the checksum, i don't know what's the reason.
The text was updated successfully, but these errors were encountered: