2012-06-28, 17:03:05
I desperately needed to get the ds30 running on my 18F25K22 using the internal oscillator at 16MHz, 4x PLL and USART2. It's taken a lot of time to get it working but with the collective wisdom of the forum I have succeeded, so many thanks.
It boiled down to putting code in user_code.inc to make sure all the ANSELs are correctly set to digital mode, TRIS's correct, comparators switched off, ADCON set to digital (only needed for USART1) and the correct oscillator configuration. Finally setting the CONFIG registers correctly for my setup.
Of course getting these devices to work properly even when not using a bootloader means getting all that right too.
Finally I tried to find out what breaks it. Setting OSCTUNE to b'11000000' to feed the PLL from the internal oscillator was a vital one.
If anyone's interested I'll post my set of files.
Now to get ds30 going on my 18F44K22, should be a doddle...
John
It boiled down to putting code in user_code.inc to make sure all the ANSELs are correctly set to digital mode, TRIS's correct, comparators switched off, ADCON set to digital (only needed for USART1) and the correct oscillator configuration. Finally setting the CONFIG registers correctly for my setup.
Of course getting these devices to work properly even when not using a bootloader means getting all that right too.
Finally I tried to find out what breaks it. Setting OSCTUNE to b'11000000' to feed the PLL from the internal oscillator was a vital one.
If anyone's interested I'll post my set of files.
Now to get ds30 going on my 18F44K22, should be a doddle...
John