Page 1 of 1

18F8627 speed problem.

Posted: Thu Sep 13, 2012 9:09 am
by electronix
Hi everyone.
Has anyone made a design/program using 18F8627 succesfully?
I have been trying to make it work @20MHz but there seem to be some oscillator problem, if I make a loop with a 2mS delay and toggle a port pin I get 498Hz!
Tried to compensate this by reducing the oscillator speed in projekt options, but still it´s very hard to get it perfect.
Also when I try using the RF component it just doesnt do anything, but perhaps that it because of the oscillator speed problems.

Is this a problem to anyone else here??


Best Regards

electronix

Re: 18F8627 speed problem.

Posted: Thu Sep 13, 2012 9:15 am
by Benj
Hello Electronix,

Do you need the frequency out from the pin to be exactly 500hz? If so then you might be better off using a timer interrupt to control the time period. The delays might have a slight overhead (this will be reported in the compiler messages) and the port out function will also create a slight overhead to the delays which may explain your missing 2hz.

Regarding the RF component problem. Could you attach your program and I will take a look for you.

Re: 18F8627 speed problem.

Posted: Thu Sep 13, 2012 11:20 am
by electronix
Hi Ben.

Thanks for your very quick reply, the main problem is not the missing 2Hz but the lack of coms with the RF unit, I just thought it may be related someway.
Sure I´ll post the program but all it actually does is; send a byte and wait a sec.

Thanks alot Ben.

electronix

Re: 18F8627 speed problem.

Posted: Thu Sep 13, 2012 11:22 am
by Benj
Hello,

Maybe try turning down the baud rate a bit. I think to get a baud of 19200 bps working you need to tune the transmit and receive parameters to ensure the signal comes through reliably.

Re: 18F8627 speed problem.

Posted: Thu Sep 13, 2012 12:08 pm
by electronix
Hi Ben

Ok I´ll try that straight away.

Thanks alot Ben :-)

electronix