I'm trying to setup a dspic 30f4011 w/ CAN.
I can get error frames on the CAN network but can't get the PIC to transmit at 500k.
I'm using a dsPICDEM2 w/ a 8 MHz crystal. I've configured the bit timing based on the settings suggested by the Intrepidcs Microchip CAN Bit Timing Calculator. The issue seems to be that the device doesn't match this calculator at all and how you configure the MIPS setting.
I've configured the oscillator for XT_PLL8 and the MIPS at 16MIPS. I can't seem to get the correct settings for the CAN channel. Can someone provide details on what I need to do?
I'm running MPLAB v8.3 w/ Matlab 2007b and the C30 compiler.
Attached should be my model. What am I setting incorrectly?
CAN Configuration
CAN Configuration
- Attachments
-
- test_v2.mdl
- (78.27 KiB) Downloaded 731 times
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: CAN Configuration
Dear sathishr ,
It's a very long time I made the blocks CAN and I have not been using them since. Anyway, It works well when I tested it.
Anyway, I do not understand how you can check the received data with this model. You should try for example to send CAN received data to the PC through the UART port. or make a led blinking when a specific data is received. The "Display" blocks have no effect.
Also, you may check if the dsPIC is effectively running at 16 MIPS (using a blinking led for example and checking precisely with a scope). Anyway, If you find any bug in the CAN configuration, please report, I'll correct it.
Lubin
It's a very long time I made the blocks CAN and I have not been using them since. Anyway, It works well when I tested it.
Anyway, I do not understand how you can check the received data with this model. You should try for example to send CAN received data to the PC through the UART port. or make a led blinking when a specific data is received. The "Display" blocks have no effect.
Also, you may check if the dsPIC is effectively running at 16 MIPS (using a blinking led for example and checking precisely with a scope). Anyway, If you find any bug in the CAN configuration, please report, I'll correct it.
Lubin
Who is online
Users browsing this forum: No registered users and 2 guests