18F8627 speed problem.

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Contact:

18F8627 speed problem.

Post 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

User avatar
Benj
Matrix Staff
Posts: 14848
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: 18F8627 speed problem.

Post 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.

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Contact:

Re: 18F8627 speed problem.

Post 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
Attachments
RF_test_18F8627_V4.fcf
(5 KiB) Downloaded 170 times

User avatar
Benj
Matrix Staff
Posts: 14848
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: 18F8627 speed problem.

Post 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.

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Contact:

Re: 18F8627 speed problem.

Post by electronix »

Hi Ben

Ok I´ll try that straight away.

Thanks alot Ben :-)

electronix

Post Reply