From 51840644864088fc17bef2476fec47e026653d09 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Wed, 28 Dec 2011 18:43:36 -0500 Subject: Fixing ArduinoISP sketch by lowering baud rate to 9600 (from 19200). http://code.google.com/p/arduino/issues/detail?id=661 --- programmers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programmers.txt b/programmers.txt index b4b12ef..02457d9 100644 --- a/programmers.txt +++ b/programmers.txt @@ -21,4 +21,4 @@ parallel.force=true arduinoisp.name=Arduino as ISP arduinoisp.communication=serial arduinoisp.protocol=stk500v1 -arduinoisp.speed=19200 +arduinoisp.speed=9600 -- cgit v1.2.3-18-g5258 From 3ece2827a48166d957d3e347035561d5a1104930 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Fri, 30 Dec 2011 18:05:12 -0500 Subject: Simplifying microseconds <-> clock cycles conversions. (Rob Tillaart) This should fix problems with overflows in pulseIn(). It may make millis() slightly less precise for clock speeds that aren't multiple of 1 million, but we don't really support those anyway. http://code.google.com/p/arduino/issues/detail?id=675 --- cores/arduino/Arduino.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index c05b919..bfec943 100755 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -73,8 +73,8 @@ extern "C"{ #define noInterrupts() cli() #define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) -#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (F_CPU / 1000L) ) -#define microsecondsToClockCycles(a) ( ((a) * (F_CPU / 1000L)) / 1000L ) +#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() ) +#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() ) #define lowByte(w) ((uint8_t) ((w) & 0xff)) #define highByte(w) ((uint8_t) ((w) >> 8)) -- cgit v1.2.3-18-g5258