From: Johan K. <joh...@id...> - 2001-01-25 21:17:13
|
Hi Scott Ok, thanks, this is mine (attached) Please remember that setting RCLK or TCLK obsoletes most (if not all) of the T2MOD bits. And if you don't use timer1, please don't touch it. Johan P.S. Sorry to hear that you're not using Linux. But that's your choice. I guess our world just needs masochists ... ----- Original Message ----- From: Scott Hughes <sh...@da...> To: <sdc...@li...> Sent: Thursday, January 25, 2001 9:23 PM Subject: RE: [sdcc-devel]weird printf behaviour > > for you) before the end of this weekend, so instead please try to convince > > your collegues to send me some of their new sensors (like the > > DS-ADI-401) so > > I can test them as well :) > > I'll see what I can do.. ;) > > > You can find the preliminary tstfind.hex, temp.hex and counter.hex at > > www.iduna.nl/sdcc/ds390/ow > > You have to run Javakit at 9600 baud, since serial0 (for now, i'm > > working on > > it) uses timer1 and so does (has to!) serial1. If you are using Linux (and > > you should:) you could use "tinitalk -c -b 115200 -B 9600 execute > > tstfind.hex" that will download the file at 115200baud and start the > > application at 9600baud. > > I'm using win2k with a cygwin environment for all of my development. I > wanted to try to build your tinitalk, but I'm missing tini.h. > > Here's my modified Serial390Init routine, in case it helps.. Setting up > timer2 for serial0 was a pretty simple fix: > > void Serial390Init(void) > { > file://Setup Timer1 for baud generation > TR1 = 0; // stop timer 1 > > TL1 = TH1 = DEFAULT_CONSOLE_BAUD; > > TMOD = (TMOD&0x0f) | 0x20; // timer 1 is an 8bit auto-reload counter > > TF1 = 0; // clear timer 1 overflow flag > TR1 = 1; // start timer 1 > > #if USE_TIMER2_FOR_SERIAL0 > file://Setup Timer2 for baud generation > TR2 = 1; // stop timer 2 > > TH2 = RCAP2H = 0xFF; > TL2 = RCAP2L = DEFAULT_CONSOLE_BAUD; > > T2CON |= 0x30; file://enable Timer2 control for serial1 > > T2MOD = (T2MOD&0x0f) | 0x20; // timer 2 is an 8bit auto-reload counter > > TF2 = 0; // clear timer 2 overflow flag > TR2 = 1; // start timer 2 > #else > T2CON &= 0xCF; file://disable Timer2 control for serial1 > #endif > > OpenCOM(0,0);//initialize serial0's buffers so we're ready for the console > } > > Scott > > -- > Scott Hughes - sh...@da... > Engineer, Auto Information > Dallas Semiconductor > > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > http://lists.sourceforge.net/lists/listinfo/sdcc-devel > |