18f2680 can config


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default 18f2680 can config

    Hi I could do with a bit of help on optimum PIC18F2680 CAN timing settings.
    It is correctly terminated with 120R resistors at both ends.

    I'm confused by quanta etc.

    The PIC data sheet is attached and I have tried the three lots of settings shown in the code tags below.
    I also tried various online calculators.

    What do you think the optimum register settings should be for the 32mhz PIC and 500kbps 3 Meter CAN bus? :unsure:

    Code:
    'Test1 Doesn't Work at all
    
    'BRGCON1 = %01000001 'brp = 2(32 mhz), jump 2 TQ (SWJ)
    
    'BRGCON2 = %10011000 'freely programmable , sample once, 4TQ seg1, propagation time 1Tq
    
    'BRGCON3 = %00000011 '4TQ seg2   
    
    
    
    'Test2 Works Better. (This is the one I am using at present but I still have some errors)
    
    BRGCON1 = %01000001 'brp = 2(32 mhz), jump 2 TQ (SWJ)
    
    BRGCON2 = %10101110 'freely programmable , sample once, 6TQ seg1, propagation time 7Tq
    
    BRGCON3 = %00000001 '2TQ seg2       
    
    
    
    'Original Works + Errors
    
    'BRGCON1 = %00000001 'brp = 2(32 mhz), jump 1 TQ (SWJ)
    
    'BRGCON2 = %10001111 'freely programmable , sample once, 2TQ seg1, propagation time 8Tq
    
    'BRGCON3 = %00000100 '5TQ seg2
    Thanks

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: 18f2680 can config

    No one working with CAN?

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,793


    Did you find this post helpful? Yes | No

    Default Re: 18f2680 can config

    Too complicated!

    Ioannis

Similar Threads

  1. Config help
    By Sabahan in forum PBP3
    Replies: 9
    Last Post: - 4th September 2014, 01:33
  2. config
    By n0yox in forum PBP3
    Replies: 12
    Last Post: - 10th June 2014, 09:07
  3. PIC12F675 - config
    By Vezito in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th June 2011, 21:29
  4. config help please?
    By karenhornby in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 18th June 2008, 00:49
  5. Need help with config
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 25th February 2008, 07:57

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts