![]() |
|
#1
|
|||
|
|||
|
CAN transmit 8 filters
Hi guys,
I have set up the CAN with 8(bit) filters and all works. There is, however, one thing that has stumped me. I can write values into the transmit data registers with a statement storing the it. i.e. 12 3542 ! whatever I store and send with this is seen correctly at the receiving end. The send word is similar to the snipped below but without the 8 data bytes. Now, if I set up the same statement (with 8 values/registers) as, : TEST 12 3542 ! etc. ; EEWORD then... noting happens with the registers. The registers do not change when using TEST. I can copy and paste the values into the NMITerm and it works. Actually, I manually paste 0 values into the registers so I know the data is valid when testing. Any explantion for this? I have also been using a check for TX0E? before storing values and transmitting. It transmit but there are no changes to the data transmit registers.. In contrast the below code does always work. : CH1 10 DD0 ! 00 DD1 ! 00 DD2 ! 00 DD3 ! TBYTE1 @ DD4 ! TBYTE2 @ DD5 ! TBYTE3 @ DD6 ! TBYTE4 @ DD7 ! TBYTE5 @ DD8 ! TBYTE6 @ DD9 ! TBYTE7 @ DDA ! TBYTE8 @ DDB ! 8 DDC ! TX0 ; EEWORD Also, what are the proper timing registry setting if I want to increase the clock from 500K to the max 1M? I have used an 8 byte/4 filter scenario for a while but now I have run into a puzzle with the 8 byte/8 filter.... So, thoughts are welcome... Cheers, Per Last edited by Norse : 03-21-12 at 02:38 PM. |
|
#2
|
|||
|
|||
|
CAN setup
Your TEST word is shown in decimal, while your other words are shown in hex?
|
|
#3
|
|||
|
|||
|
Hi Fabio,
The snippets were copied from different sections. Hex and decimal are used in some sections with the proper command. I am not sure why but I had some odd behaviours which went away after reflashing the pod.... I later had some spurious values showing up om my screen in spite of the print statement being commented out... Full deletion of the command removed that behaviour. I have 8 filters or channels running right now. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|