aFewBits / stc-led-clock

Replacement firmware for STC 8051 based DIY LED clock kits
MIT License
55 stars 20 forks source link

Need working HEX file for YD-020 clock #9

Closed Madhava-04 closed 5 years ago

Madhava-04 commented 6 years ago

I understand that you have a code that works well for the circuit I attach here. As I have no knowledge of coding, I request you to send me HEX file that I could flash to STC15F204EA on this clock. I want to do this mainly because the stock firmware does not support 12/24 Hr mode. yd-020 clock

flyingsaucer0001 commented 6 years ago

@Madhava-04 My green model is based on STC15W404AS and schematic it's different. It seems to me that you have my amber model based on STC15F204 but without relay and only 4 Transistor 8550, while relay one model has 5 transistor plus relay module. So looking between two schematic yours and mine I've recompiled as my amber and told false to relay.

define BOARD_TALKING FALSE

define BOARD_BLUE_6 FALSE

define BOARD_BLUE_5_RELAY TRUE

define BOARD_YELLOW_5 FALSE

define BOARD_YELLOW_SMALL FALSE

define BOARD_WHITE_SMALL FALSE

define BOARD_GREEN_SMALL FALSE

define COMMON_ANODE TRUE

define COMMON_CATHODE FALSE

define PROC_IS_15W408AS FALSE

define PROC_IS_15W404AS FALSE

define PROC_IS_15F204EA TRUE

define HAS_LDR TRUE

define HAS_THERMISTOR TRUE

define HAS_RELAY FALSE

define DIGIT_3_FLIP TRUE

// When setting TEST_DEFAULTS to TRUE, // ensure that all display options are TRUE as well // OPT_TEMP_DSP OPT_DATE_DSP OPT_DAY_DSP // All three must be set to TRUE otherwise some code will fail // Just ensure that any mode bit that is ON has // has corresponding logic enabled in codeto support it.

define TEST_DEFAULTS FALSE

//--------------------------------------------------------------------------- // End Hardware Option configuration //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Begin Software Option configuration //---------------------------------------------------------------------------

define OPT_ALARM TRUE // TRUE to implement

define OPT_CHIME TRUE // FALSE removes

define OPT_TEMP_DSP TRUE

define OPT_DATE_DSP TRUE

define OPT_DAY_DSP TRUE

define OPT_UNITS_GROUP FALSE // use 12/F/MD or 24/C/DM groups

// Set the default units for the clock // Use only one each of these groups of two

define SET_12HR_FORMAT FALSE

define SET_24HR_FORMAT TRUE

define SET_MMDD_FORMAT FALSE

define SET_DDMM_FORMAT TRUE

define SET_DEGF_FORMAT FALSE

define SET_DEGC_FORMAT TRUE

here it is main.hex compiled go this page I've uploaded there here it's not working

https://ufile.io/hfb02

click on slow download to take main.hex link expires in 4 weeks

Best regards Tony Let me know if it's working

Madhava-04 commented 6 years ago

Tony, I really thank you a lot to help me. Your code worked on my clock absolutely perfect ! I observe that when I choose 12 hour mode the first digit shows zero. For example 21:00 is shown as 09:00. If possible can you fix this ?

When I switch on Chime, and when chime rings, some settings are getting changed. For e.g, Temp format was C and date format was DD/MM. But after chime rings, the format that gets displayed becomes F and MM/DD. I switched off Chime and settings do not change

I used STC-ISP tool to upload HEX file to MCU. Here do I need any special settings ? Will any of these settings alter accuracy of clock ?

I once again thank you for giving life to my dead clock

Madhava-04

On Fri, Jun 29, 2018 at 8:09 PM, flyingsaucer75 notifications@github.com wrote:

@Madhava-04 https://github.com/Madhava-04 My green model is based on STC15W404AS and schematic it's different. It seems to me that you have my amber model based on STC15F204 but without relay and only 4 Transistor 8550, while relay one model has 5 transistor plus relay module. So looking between two schematic yours and mine I've recompiled as my amber and told false to relay.

define BOARD_TALKING FALSE

define BOARD_BLUE_6 FALSE

define BOARD_BLUE_5_RELAY TRUE

define BOARD_YELLOW_5 FALSE

define BOARD_YELLOW_SMALL FALSE

define BOARD_WHITE_SMALL FALSE

define BOARD_GREEN_SMALL FALSE

define COMMON_ANODE TRUE

define COMMON_CATHODE FALSE

define PROC_IS_15W408AS FALSE

define PROC_IS_15W404AS FALSE

define PROC_IS_15F204EA TRUE

define HAS_LDR TRUE

define HAS_THERMISTOR TRUE

define HAS_RELAY FALSE

define DIGIT_3_FLIP TRUE

// When setting TEST_DEFAULTS to TRUE, // ensure that all display options are TRUE as well // OPT_TEMP_DSP OPT_DATE_DSP OPT_DAY_DSP // All three must be set to TRUE otherwise some code will fail // Just ensure that any mode bit that is ON has // has corresponding logic enabled in codeto support it.

define TEST_DEFAULTS FALSE

//----------------------------------------------------------

// End Hardware Option configuration //----------------------------------------------------------

//----------------------------------------------------------

// Begin Software Option configuration //----------------------------------------------------------

define OPT_ALARM TRUE // TRUE to implement

define OPT_CHIME TRUE // FALSE removes

define OPT_TEMP_DSP TRUE

define OPT_DATE_DSP TRUE

define OPT_DAY_DSP TRUE

define OPT_UNITS_GROUP FALSE // use 12/F/MD or 24/C/DM groups

// Set the default units for the clock // Use only one each of these groups of two

define SET_12HR_FORMAT FALSE

define SET_24HR_FORMAT TRUE

define SET_MMDD_FORMAT FALSE

define SET_DDMM_FORMAT TRUE

define SET_DEGF_FORMAT FALSE

define SET_DEGC_FORMAT TRUE

here it is main.hex compiled go this page I've uploaded there here it's not working

https://ufile.io/hfb02

click on slow download to take main.hex link expires in 4 weeks

Best regards Tony Let me know if it's working

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aFewBits/stc-led-clock/issues/9#issuecomment-401374550, or mute the thread https://github.com/notifications/unsubscribe-auth/Amv7m0MQq8GGH1Lfp-NOLMR_R2fGGKR3ks5uBjwcgaJpZM4U5i7M .

-- R.S.Madhava Murthy

Madhava-04 commented 6 years ago

I want to know if this software has setting for year. Please let me know how date and month will work in a leap year when I am not setting year in the clock

aFewBits commented 6 years ago

The clock expects the year to be set. Leap year is handled by the DS1302 Real Time Clock chip.

I do not have the exact board you have so I am unable to test the configuration. I would expect any problems to be related to the mapping differences of the F204 and W404 chips on ports 0 and 5. Since the RTC works and sends the time to the firmware, there are no issues with the F204/W404 differences.

Madhava-04 commented 6 years ago

I asked that question because software that you sent has no option to set year. Was that missed out or the software has this limitation ? In setting, I see option to set Clock, Alarm, Chime, Date, Month and Day