Comments (9)
I had the same problem with my yellow color unit.
I exchanged the (8) 510 ohm segment resistors with 47 ohm parts. This allows for a nice brightness range. While this appears to be a large change, the resulting current was within expected limits. I can only surmise the yellow LED's are significantly dimmer than the other colors.
from stc_diyclock.
@aFewBits
First all thanks a lots for your work, I've perfectly repaired another Clock kkmoon with your source.
I've installed kali linux in a virtual machine installed sdcc and compiled modifying global.h, then I've programmed the chip by windows with a little usb to ttl based on cp2102 using stc-isp-15xx-v6.86L.exe.
Now I've another one I do not succeed in compiling it correctly it gives always some error.
This is the schematic:
With this one I've tried with this changes:
from stc_diyclock.
Closed issue by error sorry people.
I've modified global.h this way:
#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 TRUE
#define DIGIT_3_FLIP TRUE
but If I compile receive this:
oot@kali:/Desktop/DiyClock/afewbits/stc-led-clock-amber# make/Desktop/DiyClock/afewbits/stc-led-clock-amb
mkdir -p build/
sdcc --iram-size 256 --code-size 8000 --data-loc 0x30 --disable-warning 158 -o build/adc.rel -c src/adc.c
mkdir -p build/
sdcc --iram-size 256 --code-size 8000 --data-loc 0x30 --disable-warning 158 -o build/ds1302.rel -c src/ds1302.c
src/ds1302.c:38: error 20: Undefined identifier 'SCLK'
src/ds1302.c:39: error 20: Undefined identifier 'CE_LO'
src/ds1302.c:41: error 20: Undefined identifier 'CE_HI'
src/ds1302.c:57: error 20: Undefined identifier 'IO_LO'
src/ds1302.c:58: error 20: Undefined identifier 'IO_WR'
src/ds1302.c:61: error 20: Undefined identifier 'SCLK'
src/ds1302.c:63: error 20: Undefined identifier 'SCLK'
src/ds1302.c:80: error 20: Undefined identifier 'SCLK'
src/ds1302.c:82: error 20: Undefined identifier 'SCLK'
src/ds1302.c:87: error 20: Undefined identifier 'IO_RD'
Makefile:12: recipe for target 'build/ds1302.rel' failed
make: *** [build/ds1302.rel] Error 1
root@kali:
while setting global.h this way:
#define BOARD_TALKING FALSE
#define BOARD_BLUE_6 TRUE
#define BOARD_BLUE_5_RELAY FALSE
#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 TRUE
#define DIGIT_3_FLIP TRUE
Blue 6 scheme it compiles but clock works very strange only first two digits light up and I can also listen an high noise frequency through speaker I think......
Look at this photo:
while trying flashing model_c by zerog2k this is what happens:
help me please to restore my wonderful amber clock (with stock was working but I don't like original firmware)
On back there's a green one with afewbits compiled source now it's working perfectly it's another model without relay blue PCB stock firmware was buggy and autodim was not working and then always showing date day week year now it's perfect and shining.
from stc_diyclock.
With zerog2k's firmware, IIRC, the 1F:7F display occurs when DS1302 is not communicating with the processor. I just posted a fix for the 15F204EA processor type on my repo and if you have comments or questions on my code, you should ask a question on that repo rather than here.
from stc_diyclock.
aFewBits you are right I'll close here and open issue there. Only for info also my model something hybrid with MODEL_C (it misses only relay on PCB) needs:
Changed DS1302's CE to open-drain output
//M1 M0
// 0 0 Bidirectional
// 0 1 Push-Pull
// 1 0 Input
// 1 1 Open-drain
// IO CE CK
P1M1 = 0b00000010;
P1M0 = 0b00000010;
Constant 1F 7F has been changed to constant 00 00, but still could not set time.
Maybe all DS1302 pins need to be set to bidirectional as vargham suggested for his Model_D and solved.
I don't know how to do it.
@aFewBits thanks for helping opening question on your repo now.
from stc_diyclock.
Maybe better leave this open to permit also zerog2k to add all DS1302 pins bidirectional for model_c
from stc_diyclock.
As far as I understand it, from page 54 (5.1 Special Function Registers) of the STC15F204EA datasheet, power-on defaults for P0Mx and P1Mx registers should be all zeroes, meaning pinmode is "quasi-bidirectional". I have seen this issue (ds1302 communication) reported several places, but myself have not been able to reproduce it. All of the models I had are slightly different w.r.t. pullups on various ds1302 lines, and different from what folks are having... I think the manufacturers keep cutting corners and saving $0.0001 on external pullup resistors here and there..
I think a "real ds1302" is supposed to have something like approx 40k internal pull_down_ resistor on the signal lines, fwiw (so wondering here if one needs to use push-pull to push up the clock/select lines - there is also the question of whether your data line has a pull-up. If no, this could get tricky if you have to change this pin between modes when switching from writing to reading and back).
For this particular model, you may need to add a new model type if this is unlike anything existing. It sounds like it might be the case.
from stc_diyclock.
@flyingsaucer75
You referred in post date Mar 30, that green color clock with afewbits compiled source now is working perfectly. Is it possible to upload HEX file of that ? I have no knowledge of writing or compiling codes. I want to try this HEX on my broken clock ! I have a clock with RED Leds and I attach circuit diag
from stc_diyclock.
@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
click on slow download to take main.hex link expires in 4 weeks
Best regards
Tony
Let me know if it's working
from stc_diyclock.
Related Issues (20)
- "Waiting for MCU, please cycle power" HOT 3
- 4 digit display models? HOT 3
- buttons don't work HOT 17
- Website for original maker of these kits
- Need help with make on windows HOT 1
- синхронизация времени с приемником GPS вывод последовательных данных NMEA HOT 8
- Time stops ticking when power is lost HOT 1
- Привет! HOT 3
- Dot-Matrix version? HOT 3
- hourly chime HOT 3
- Weird bevaviour with STC15W408AS HOT 7
- New hardware version from Banggood w/ STC15W408AS? HOT 25
- My kit reset time to 00:00 01-01-2000 each power cycle HOT 2
- barebone firmware HOT 3
- Firmware for clock with voice HOT 3
- Worked for 10 minutes with new chips and then stopped... HOT 3
- Brightness level HOT 7
- Random slow downs. STC15W408AS HOT 2
- Makefile SDCCOPTS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stc_diyclock.