Problems on having programmed arduino

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
User avatar
Francisco Cabrera
Posts: 47
Joined: Sat Mar 19, 2016 4:56 pm
Location: Canary Island
Has thanked: 23 times
Been thanked: 7 times
Contact:

Problems on having programmed arduino

Post by Francisco Cabrera »

Hello my name is frank, I am electronic and live in canary island, I have a doubt on having programmed arduino 1 R3,
If in program I put one temporizador for 1 second .... when worked in the arduino not late one second, he late 7 seconds .. I not understand it ....Can help me please?

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Problems on having programmed arduino

Post by kersing »

Please post your flow chart so we can take a look at it if you need help with your program. (Use the 'Upload attachment' TAB just below the 'Save' button)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: Problems on having programmed arduino

Post by MJU »

What are the clock settings in your project?
The 7 seconds, is that when you run your program on the Arduino or when you simulate it in Flowcode?

In "build", "project options" what is the clock frequency?
The Arduino you mention should be set to 16Mhz.

Otherwise post your project here so others can investigate it.

User avatar
Francisco Cabrera
Posts: 47
Joined: Sat Mar 19, 2016 4:56 pm
Location: Canary Island
Has thanked: 23 times
Been thanked: 7 times
Contact:

Re: Problems on having programmed arduino

Post by Francisco Cabrera »

Flowcode does not give option to change anything into the configuration of the clock .... I leave capture of screen, In flowcode the this simulation well
Attachments
pro1.jpg
pro1.jpg (40.37 KiB) Viewed 7651 times
cap2.jpg
cap2.jpg (59.37 KiB) Viewed 7651 times
cap1.jpg
cap1.jpg (85.82 KiB) Viewed 7651 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Problems on having programmed arduino

Post by LeighM »

That sounds like the CKDIV8 (Divide clock by 8 ) Fuse bit is programmed.
Can you give more details about what you are doing, such as, are you using the Arduino Bootloader, or ICSP socket?

User avatar
Francisco Cabrera
Posts: 47
Joined: Sat Mar 19, 2016 4:56 pm
Location: Canary Island
Has thanked: 23 times
Been thanked: 7 times
Contact:

Re: Problems on having programmed arduino

Post by Francisco Cabrera »

I generate the hex, and later I programme it with the programmer minipro tl866, Because I cannot programme it from the flowcode,
Attachments
capturada.jpg
capturada.jpg (384.88 KiB) Viewed 7644 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Problems on having programmed arduino

Post by LeighM »

Hi,

That shows that the "Fuse Low Byte" is 0x62, hence bit 7 the CKDIV8 is 0 (programmed) causing the divide clock by 8.
You might need to check other bits too, concerning which clock is used. Have a look at "Fuse Bits" in the AVR datasheet.

Hope that helps you.
Leigh

User avatar
Francisco Cabrera
Posts: 47
Joined: Sat Mar 19, 2016 4:56 pm
Location: Canary Island
Has thanked: 23 times
Been thanked: 7 times
Contact:

Re: Problems on having programmed arduino

Post by Francisco Cabrera »

Yes you have reason. Please can you help my? .. have I that to remove the selection of ckdiv=0?
Attachments
capturada.jpg
capturada.jpg (284.23 KiB) Viewed 7584 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Problems on having programmed arduino

Post by LeighM »

For full speed you need:

[no tick] CKDIV8=1

For 16Mhz crystal you need:

[tick] CKSEL3=0
[no tick] CKSEL2=1
[no tick] CKSEL1=1
[tick] CKSEL0=0

User avatar
Francisco Cabrera
Posts: 47
Joined: Sat Mar 19, 2016 4:56 pm
Location: Canary Island
Has thanked: 23 times
Been thanked: 7 times
Contact:

Re: Problems on having programmed arduino

Post by Francisco Cabrera »

Friend leighM, thank you very much for your help, I live in canary island, here thousands of english family come to the year of vacations, if some day your you want to come here, do not forget to warn me, I will be your tourist guide free .... regards. :D

Post Reply