CAN internal
Moderator: Benj
CAN internal
Hello ! Happy New Year ! And my big disappointment. The teacher lent me a PC with FC 8 and with great hope I assembled a simple block diagram with CAN 1 and hopes collapsed. Just like in FC 5, the internal CAN does not work. Only SPI. Really for so many years the manufacturer could not do it? Only link works Set TX ID - Set Tx Data - Send Buffer. In this case, there is no access to CAN ID Full.I'm not offenced. I'm just asking for help. It is necessary to write down the addresses for example 0x810A000 0xC20A000 0xA18A000.How to apply Full ID to a macro Set TX ID Hi/Low ? Is there a way to make it work CAN 1 in FC8 ? Perhaps there is a way to make it work for receiving transmission RB2 CAN Tx RB3 CAN Rx. There is hope that I will learn to write it myself. Thanks.
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: CAN internal
It helps if you tell what controller you are using. And post the flowchart you are experiencing issues with.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
Re: CAN internal
Hi ! Thank you for your attention. Chip PIC18F2680 and CAN analyzer Microchip.The Test Can 1 2680 file works in hardware in the same way
as in FC5. File Test CAN 2 2680 ID Ulong in hardware does not work! No transmission ! My task is to pass the ID address for example
0x810A000 I was hoping the "SetTxIdent" macro would help me.Please advise. Thanks.
as in FC5. File Test CAN 2 2680 ID Ulong in hardware does not work! No transmission ! My task is to pass the ID address for example
0x810A000 I was hoping the "SetTxIdent" macro would help me.Please advise. Thanks.
- Attachments
-
- Test CAN 2 2680 ID Ulong.rar
- (98.93 KiB) Downloaded 101 times
-
- Test CAN 1 2680.rar
- (107.74 KiB) Downloaded 95 times
Re: CAN internal
I apologize for the wasted time. I was deeply mistaken. Corrected my mistakes and got the desired result. Everything worked!Matrix Respect ! There is one moment left.How, in the depths of the "SetTxIdent" macro, the decimal number is converted into the one necessary for transmission hex ? Thanks.
- Attachments
-
- Test CAN 2 2680 ID Ulong.rar
- (194.84 KiB) Downloaded 114 times
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: CAN internal
I am not quite sure if I understand your question/problem corrcetly however
if you have ID in Decimal for example 541 then the compiler automatically converts it to the correct hex value which is 0x21D, you can write the decimal or the hex value in the ID properties of the "SetTxIdent" macro it makes no difference to the compiler. I hope I got your problem correctly
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
Re: CAN internal
Hi ! I proceed from the fact that FC 8 CAN1 offers two macros "SetTxID" & "SetTxIdent". The "SetTxID" macro is standard for numbers 0-2047 and requires the number to be converted to high and low bits. There are formulas in the help file. The macro "SetTxIdent" standard and extended works with ULONG numbers, which allows you to write the standard ID and the extended ID as a decimal number.However, the decimal number Ulong cannot be written to the register.The TXBnEIDH and TXBnEIDL extended mode registers also require high and low bits. What formulas to use for the conversion, I have not yet understood. Everything I do in FC8 is trying to learn "C" and "ASM". Thanks.