How long does this take to execute


Results 1 to 24 of 24

Threaded View

  1. #20
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: How long does this take to execute

    I have to admit I haven't done this using PBP, but I don't see any reason why an 18F25K22 @ 64MHz using DT-INTS wouldn't work out just fine.
    There's plenty of ram and speed available. For that matter, if you're just transmitting DMX you don't even need to use interrupts... they just make it easier to transmit one packet while generating the next one.

    DMX calls for a fixed baudrate of 250K with 8 bits of data + 2 stop bits, so that's 11 bits total (START + 8 data + 2 STOP) for 44us/byte. Note that if you're using a pic uart to send data you'll have to generate the second stop bit using a delay of 4us between bytes, but that's not normally a problem.

    DMX uses packets of 513 bytes (a START_CODE byte + 512 bytes of data). Normally packets are send continuously about 44 times/sec (22.7msecs) which is the max full-out time for 513 bytes, but as long as you send one packet every second that meets the spec. As the transmitter, there's no other byte-to-byte time limit so things are pretty flexible.

    If you're the receiver then things are a bit trickier since you HAVE to assume that you could get 513 bytes at the full-on speed of one byte/44us. That's still doable with a 25K22, but you almost have to use RX interrupts to collect a packet. That said, I've done both transmitters and receivers without using interrupts at all. Sometimes they just complicate things more than they help.
    Last edited by tumbleweed; - 18th August 2016 at 13:32.

Similar Threads

  1. Unable to execute mpasmwin
    By oldmainframer in forum General
    Replies: 3
    Last Post: - 17th December 2016, 23:01
  2. Interrupt won't execute.
    By bison_bloke in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 26th March 2010, 15:46
  3. Replies: 5
    Last Post: - 24th February 2009, 18:55
  4. Proteus Execute Error
    By pramarn in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th October 2006, 08:51
  5. SEROUT2 takes 1400ms to execute?
    By droptail in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th March 2006, 17:08

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