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
18F8627 speed problem.
Moderator: Benj
-
- Posts: 58
- Joined: Sat Aug 22, 2009 5:45 pm
- Has thanked: 17 times
- Been thanked: 7 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: 18F8627 speed problem.
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 58
- Joined: Sat Aug 22, 2009 5:45 pm
- Has thanked: 17 times
- Been thanked: 7 times
- Contact:
Re: 18F8627 speed problem.
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
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
- Attachments
-
- RF_test_18F8627_V4.fcf
- (5 KiB) Downloaded 316 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: 18F8627 speed problem.
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 58
- Joined: Sat Aug 22, 2009 5:45 pm
- Has thanked: 17 times
- Been thanked: 7 times
- Contact: