Hi All,
Newbee here..
Struggling with the onboard RTC of the dspMIAC (MCP7904), I see we can just right a string to set the time?, if I have a string defined as RTC[20] and use "1234" the Miac acts like a counter starting at 123400 I am a little confused how to either put a "/" or a ":" to separate hours from minutes,
Any ideas?
Regards,
Gavin
RTC -dspMIAC
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: RTC -dspMIAC
Hi,
The SetTime string is in the format HHMMSS
e.g. "102700" for 10:27
It is the same for the return from GetTime
If you want to display this as 10:27:00 then you will need to use string functions, or something like
The SetTime string is in the format HHMMSS
e.g. "102700" for 10:27
It is the same for the return from GetTime
If you want to display this as 10:27:00 then you will need to use string functions, or something like
Code: Select all
RTC[8] = 0
RTC[7] = RTC[5]
RTC[6] = RTC[4]
RTC[5] = ':'
RTC[4] = RTC[3]
RTC[3] = RTC[2]
RTC[2] = ':'
Re: RTC -dspMIAC
The Leigh!,
Have it working now..
Regards,
Gavin
Have it working now..
Regards,
Gavin
- Attachments
-
- RTC_MIACdsp.fcfx
- (13.3 KiB) Downloaded 246 times