DT averaging of interrupt driven cap sensor


Results 1 to 9 of 9

Threaded View

  1. #5
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: DT averaging of interrupt driven cap sensor

    This is what gets me there on an 16f1828 @115,200 baud (16Mhz Osc)...

    Code:
    Osccon = %01111010   'sets the internal oscillator to 16Mhz
    DEFINE  OSC 16
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
    DEFINE HSER_SPBRG 34  ' 115200 Baud @ 16MHz, -0.79%
    SPBRGH = 0
    BAUDCON.3 = 1         ' Enable 16 bit baudrate generator
    RCSTA.7 = 1             ' Enable RB7 for TX USART (not sure if this is needed - needs removing one day to see!)
    TrisB.7 = 0                ' set pin 10 RB7 to be an output

    MrE's picmulticalc utility helps a lot wrt setting defines for your required serial speed...

    http://www.picbasic.co.uk/forum/show...5639#post65639

    your command usage looks fine - have you tried scoping the hserout pin?
    Last edited by HankMcSpank; - 15th September 2011 at 13:15.

Members who have read this thread : 0

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