MIAC dsPIC Clock to Arduino Mega 2560 R3
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
MIAC dsPIC Clock to Arduino Mega 2560 R3
Hi every one
Freelance programs!
Do you have the option of getting the Original Clock from dsMIAC to work in the Arduino Mega 2560 R3
And uses the keyboard type Flowcode Keypad (EB014)
See attached original Clock: Please reply to my Private messages!
Freelance programs!
Do you have the option of getting the Original Clock from dsMIAC to work in the Arduino Mega 2560 R3
And uses the keyboard type Flowcode Keypad (EB014)
See attached original Clock: Please reply to my Private messages!
Best Regard
Monie
Monie
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC dsPIC Clock to Arduino Mega 2560 R3
Hello everyone
Is there anyone on Flowcode who will help with the above post!
Is there anyone on Flowcode who will help with the above post!
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: MIAC dsPIC Clock to Arduino Mega 2560 R3
Hi Monie,
Your problem could be a hardware issue, can you attach a circuit diagram?
e.g. I asked in your previous post about pull-ups on your RTC device.
Leigh
Your problem could be a hardware issue, can you attach a circuit diagram?
e.g. I asked in your previous post about pull-ups on your RTC device.
Leigh
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC dsPIC Clock to Arduino Mega 2560 R3
HI LeighM
I do not understand;-)
After all, MIAC dsPIC Clock is a built-in device that has no external device connected...
I do not understand;-)
After all, MIAC dsPIC Clock is a built-in device that has no external device connected...
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: MIAC dsPIC Clock to Arduino Mega 2560 R3
Hi Monie,
I don't understand either
Are you using an MCP7940 RTC device connected to an Arduino Mega 2560 Rev3 board?
Or do you want to convert the MIAC dsPIC example into a MIAC Arduino version?
I don't understand either
Are you using an MCP7940 RTC device connected to an Arduino Mega 2560 Rev3 board?
Or do you want to convert the MIAC dsPIC example into a MIAC Arduino version?
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC dsPIC Clock to Arduino Mega 2560 R3
Hi LeighM
Yes I thought I was going to convert to Arduino Mega 2560 Rev3 board? Can I do this?
I use MCP7940 RTC device connected to an Arduino Mega 2560 Rev3 board?
Do you have any suggestions?
Attached files:
Yes I thought I was going to convert to Arduino Mega 2560 Rev3 board? Can I do this?
I use MCP7940 RTC device connected to an Arduino Mega 2560 Rev3 board?
Do you have any suggestions?
Attached files:
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: MIAC dsPIC Clock to Arduino Mega 2560 R3
What is your hardware? Circuit?
How are you connecting the MCP7940 RTC device to the Arduino board?
You could use any pin with the Software channel, or for hardware channel 1 use:
SCL PD0 (DIGITAL PIN 21)
SDA PD1 (DIGITAL PIN 20)
And don't forget the pull-up resistors
How are you connecting the MCP7940 RTC device to the Arduino board?
You could use any pin with the Software channel, or for hardware channel 1 use:
SCL PD0 (DIGITAL PIN 21)
SDA PD1 (DIGITAL PIN 20)
And don't forget the pull-up resistors
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC dsPIC Clock to Arduino Mega 2560 R3
Hi LeighM
Display LCD I2C works fine for EB092. Can write for display!
User: SDA to Port D1 and SCL to Port D0 - This works
And user hardware channel 1
And uses pull-up resistor...
User Component: RTC (MCP7940N) (Storage)
I have tried a lot but with no luck being able to adjust the time and date..
Please see Compiler Messages:
Cannot get "20" inserted into Macro Print Date as exemplified in Display year "2019"
See attachment:
Display LCD I2C works fine for EB092. Can write for display!
User: SDA to Port D1 and SCL to Port D0 - This works
And user hardware channel 1
And uses pull-up resistor...
User Component: RTC (MCP7940N) (Storage)
I have tried a lot but with no luck being able to adjust the time and date..
Please see Compiler Messages:
Code: Select all
Target folder: C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2
Source name: C:\Users\sun\OneDrive\Documents\Mega 2560 LCD I2C NEW SolarTracker\SolarTrackerMega2560-R3 011.fcfx
Title: My Project
Description: Tillader brugere at give en detaljeret beskrivelse af projektet.
Disse oplysninger vises i den genererede C-kode og i nogen af dokumentationsfunktionerne i Flowcode.
Device: ARD.ATMEGA.ATMEGA2560
Generated by: Flowcode v8.2.0.12
Date: Wednesday, August 14, 2019 13:14:14
Users: 1
Registered to: monie jacobsen
License key: X6U4U7
https://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\avr\batchfiles\avra.bat atmega2560 "C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.elf" "C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.c" "C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.lst"
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2>"C:\PROGRA~2\Flowcode\Common\COMPIL~1\avr\BATCHF~1\..\bin\avr-gcc.exe" -mmcu=atmega2560 -Os -ffunction-sections -fdata-sections -funsigned-char -o "C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.elf" "C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.c" -lm -Wl,-gc-sections
In file included from C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\includes.c:432,
from C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.c:357:
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/AVR\AVR_CAL_I2C.c:175:5: error: #error "This chip does not have I2C2 capability"
In file included from C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\includes.c:432,
from C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.c:357:
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/AVR\AVR_CAL_I2C.c: In function 'FC_CAL_I2C_Master_Start_1':
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/AVR\AVR_CAL_I2C.c:292: error: 'MX_I2C_START_X' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/AVR\AVR_CAL_I2C.c:292: error: (Each undeclared identifier is reported only once
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/AVR\AVR_CAL_I2C.c:292: error: for each function it appears in.)
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/AVR\AVR_CAL_I2C.c: In function 'FC_CAL_I2C_Master_Restart_1':
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/AVR\AVR_CAL_I2C.c:339: error: 'MX_I2C_START_X' undeclared (first use in this function)
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.c: In function 'main':
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.c:3448: warning: passing argument 1 of 'FCD_06ae1_rtc1__GetTime' discards qualifiers from pointer target type
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.c:3459: warning: passing argument 2 of 'FCM_GetTimeString' discards qualifiers from pointer target type
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.c:3469: warning: passing argument 2 of 'FCM_GetDateString' discards qualifiers from pointer target type
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.c:3484: warning: passing argument 3 of 'FCM_PrintTime' discards qualifiers from pointer target type
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 011.c:3493: warning: passing argument 3 of 'FCM_PrintDate' discards qualifiers from pointer target type
Error returned from [avr-gcc.exe]
C:\Program Files (x86)\Flowcode\Common\Compilers\avr\batchfiles\avra.bat reported error code 1
Autoclose turned off
FINISHED
See attachment:
Best Regard
Monie
Monie
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC dsPIC Clock to Arduino Mega 2560 R3
Hello everyone
Is there anyone here who will help get the Clock to work with the use of the Arduino Mega 2560 R3??????
How do I fix these warning: passing argument?
Is there anyone here who will help get the Clock to work with the use of the Arduino Mega 2560 R3??????
Code: Select all
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 012.c: In function 'main':
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 012.c:3360: warning: passing argument 1 of 'FCD_06ae1_rtc1__GetTime' discards qualifiers from pointer target type
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 012.c:3363: warning: passing argument 2 of 'FCM_GetTimeString' discards qualifiers from pointer target type
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 012.c:3379: warning: passing argument 1 of 'FCD_06ae1_rtc1__GetDate' discards qualifiers from pointer target type
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 012.c:3382: warning: passing argument 2 of 'FCM_GetDateString' discards qualifiers from pointer target type
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 012.c:3410: warning: passing argument 3 of 'FCM_PrintTime' discards qualifiers from pointer target type
C:\Users\sun\OneDrive\DOCUME~1\MEGA25~2\SolarTrackerMega2560-R3 012.c:3419: warning: passing argument 3 of 'FCM_PrintDate' discards qualifiers from pointer target type
Error returned from [avr-gcc.exe]
C:\Program Files (x86)\Flowcode\Common\Compilers\avr\batchfiles\avra.bat reported error code 1
Autoclose turned off
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: MIAC dsPIC Clock to Arduino Mega 2560 R3
Hi Monie,
The warnings can be ignored, they are not a problem.
The error is the problem, please set connection properites for the RTC component, it should then compile OK.
I am not sure that the two I2C devices will work well on the same pins, you might need to have these on separate pins if possible.
Leigh
The warnings can be ignored, they are not a problem.
The error is the problem, please set connection properites for the RTC component, it should then compile OK.
I am not sure that the two I2C devices will work well on the same pins, you might need to have these on separate pins if possible.
Leigh
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC dsPIC Clock to Arduino Mega 2560 R3
Hi LeighM
Yes` another Pin may be used...
Do you have a suggestion for another I2C device like a Web link?
All suggestions are very welcome...
Yes` another Pin may be used...
Do you have a suggestion for another I2C device like a Web link?
All suggestions are very welcome...
Best Regard
Monie
Monie