News:

;) This forum is the property of Proton software developers

Main Menu

Using the ADC on dsPIC33CK128MP505

Started by charliecoutas, Nov 10, 2021, 03:31 PM

Previous topic - Next topic

charliecoutas

All three of your clock updates work. The chip seems happy at 190MHz, the ADC's work and now I have got the DAC running - much much simpler than the ADC's. This is all going too well....

Like I asked, if the clock speed is too high, what happens?

Thanks again Les and diebobo

Charlie

top204

#21
I did a very simple test to see how stable the oscillator was at certain frequencies over time.

I created a loop, and inside the loop had HRsoutLn "Hello World", transmitting at 115200 Baud continuously, with a small delay between the transmissions so the serial terminal had time to receive correctly. What I found was that the first few characters of the text were corrupted sometimes after a few minutes, and the last value not always sent correctly, and this indicated that the oscillator was not always stable, otherwise, the texts would be received rock steady all the time 24/7.

I then reduced the oscillator by a few MHz and did the same test. I found that about 160MHz to 170MHz were very stable, and 180MHz was relatively stable, but above 186MHz, the device's internal frequency was unstable, and at 200MHz, it was so unstable very little worked. :-)

That's also why I had to remove the line:

While OSCCONbits_LOCK <> 1 : Wend

From the 190MHz procedure, because the device was not always locking its PLL and it would stay within the loop.

Simple but effective. :-) I am thinking it is may be due to the PCB I am using, because it is very tiny and the tracks are very slim and close together, so cross talk is possible as the frequency increased.

charliecoutas

Thanks for the feedback Les. I hope I have attached a photo of my board. There is a ground plane on both sides, and under the chip. I might play safe and run at 160/170MHz.

Charlie

diebobo

Quote from: charliecoutas on Nov 20, 2021, 12:47 PMThanks for the feedback Les. I hope I have attached a photo of my board. There is a ground plane on both sides, and under the chip. I might play safe and run at 160/170MHz.

Charlie

Good to see you've made some progress Charlie...Just some uhhh, unasked advice.. You say you got a groundplane on both sides, any special reason why its not connected ( as far as i can see ) massively with via's.. At least thats common practice i think...

Oh yeah, i got the thing working at 200 mhz and stable i think. I think it's best to open different topic for that as it requires some attention from Les :)

charliecoutas

#24
Thanks Bob. The two ground planes are linked here and there, but not to any great degree. I didn't know that was a Good Thing To Do. My pcb design prog (FreePCB) doesn't realise when ground areas become isolated (not connected to ground any longer) so I plant thro' holes here and there.

I read you post about 200MHz with great interest and will try it. My dsPIC33CK256MP505 seems very happy at 190MHz and I am developing the code to drive a constant power pulse generator.

I love the DAC: you can dump a 12 bit value into it and the DC appears on the output two clock cycles later.

Thanks for your help.

Charlie


top204

#25
The vias linking both top and bottom ground planes can stop capacitances forming within the layer and help eliminate any RF coupling, because it makes both the top and bottom planes seem as one solid ground with AC or oscillating signals. It comes into play when the devices operate at high frequencies.

I once designed a large board that carried RF signals as well as digital signals, so I placed my initials within the grounding vias, there were so many of them. :-)