On 2/19/2013 11:00 AM, Manu Abraham wrote: > Hi, > > I have a dsPIC33FJ16GS502 with a 10MHz xtal as the Primary Oscillator, > connected between OSC1 and OSC2 along with 2x15pf caps. > > While expecting the device to run at 40MIPS, all I see is that RA3 > toggles around 3.3Mhz and 5MHz as can be seen. > > RA3 is connected to a LED and Channel 1 of a Logic Sniffer.. > > http://farm9.staticflickr.com/8515/8489682002_9fcb64b961_b_d.jpg > > Any idea why this "jitter" ? Any pointers would be helpful. > You are using an analog pin for digital i/o so you need to set the=20 correct bit in ADPCFG, TRISA alone will not do it, from the datasheet : " The ADPCFG register has a default value of 0x0000; therefore, all pins that share ANx functions are analog (not digital) by default." You can see all kinds of weird behavior when the analog pins are not set=20 up correctly. Mark --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .