nung sina-simulate ko sya sa proteus using 8052 device,parang hindi sya nagbi-blink. yung pala "high-speed" nga pala ang mga DS89C4x0.kaya ayun inadjust ko na lang yung "delay()"..
... diba yung chip ng dallas may kailangan kang galawin na register para magamit mo sya na highspeed? ...
bakit naman nakakatakot? 'yung USB to UART chip naman ang masisira kung may mali.
ayos na ayos yung prototype ah! ang galing! may question ako dito sir yus, diba yung chip ng dallas may kailangan kang galawin na register para magamit mo sya na highspeed?
ang alam kong may register wan 'yung Timer. pwede kasi siyang i-parehas ng timing sa lumang 8051 para pwedeng drop-in replacement.
#include <8052.h>#define OVERFLOW_1S 50 char const MAP[ ] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; void timer0_init (void){ TMOD = TMOD & ~0x08; //T0_CT_ = 0; TMOD = TMOD & ~0x04; //T0_M1_ = 0; TMOD = TMOD & ~0x20; //T0_M0 = 1; //16-bit TMOD = TMOD | 0x10; TR0 = 1;} void main( void ){ unsigned char i; unsigned int overflows = 0; timer0_init(); P1 = 0x00; // initialize P1.0 = 0; while(1) { if(TF0) { TF0 = 0; overflows++; if (overflows >= OVERFLOW_1S) { overflows = 0; i++; if (i>=8) i = 0; P1 = MAP[i]; } } }}
ito gumana ito sa kasagsagan pa ng bagyo.. pero inabot ng brownout.. from the conventional "Serial Load Hardware Configuration"to this one:*uses PL2303 from this cable: CHEAP USB-serial interface cable for our MCU projects!*completely USB-powered*no other addtional IC (e.g 74xx125)inside the cdrking's nokia data cable:connections (tapping of wires):actual circuit:*has a pull-up of P3.7 pin (only for some batches of ds89c420 as indicated in the errata)the 40-pin obsolete DS89C420 (may 2 stocks pa pala ako nito sa province ):the software:*the actual hardware is not working with version 2.4.10 *works also with Loader420 and hyperterminal.. http://files.dalsemi.com/microcontroller/dev_tool_software/mtk/obsolete/