[chronojump] Chronopic crystal from 4 to 20 MHz by Teng Wei Hua
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Chronopic crystal from 4 to 20 MHz by Teng Wei Hua
- Date: Wed, 25 May 2011 16:14:41 +0000 (UTC)
commit fd013c3059a25f6073b98150f7d4b1168f2adf64
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed May 25 18:12:56 2011 +0200
Chronopic crystal from 4 to 20 MHz by Teng Wei Hua
.../chronopic-firmware-c/chronopic-firmware.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/chronopic-firmware/chronopic-firmware-c/chronopic-firmware.c b/chronopic-firmware/chronopic-firmware-c/chronopic-firmware.c
index c27378c..62ca757 100644
--- a/chronopic-firmware/chronopic-firmware-c/chronopic-firmware.c
+++ b/chronopic-firmware/chronopic-firmware-c/chronopic-firmware.c
@@ -14,12 +14,14 @@ History:
modify configuration Bits: close WDT
modify ISR and MAIN LOOP's if --> else if
limit COUNTDEBOUNCE overflow in INTERRUPT(isr)
- assembler is more efficient than C
+ assembler is more efficient than C
+ 2011-05-25 change crystal from 4 to 20 MHz by Teng Wei Hua <wadedang gmail com>
+ let SPBRG = 0X81
*/
//-- this PIC is going to be used:
-//#include <pic16f876A.h>
-#include <pic16f876a.h> //xavi (Linux Mint 10)
+#include <pic16f876A.h> //Wade (Windows)
+//#include <pic16f876a.h> //xavi (Linux Mint 10)
//*****************************************
@@ -178,7 +180,11 @@ void isr(void) __interrupt 0
//---------------------------------------
void sci_configuration()
{
- SPBRG = 0X19; // Speed: 9600 baud
+ // wade : start
+ // SPBRG = 0X19; // crystal: 4MHz Speed: 9600 baud
+ // SPBRG = 0X81; // crystal: 20MHz Speed: 9600 baud
+ SPBRG = 0X81; // Speed: 9600 baud
+ // wade : end
TXSTA = 0X24; // Configure transmitter
RCSTA = 0X90; // Configure receiver
}
@@ -394,6 +400,10 @@ void main(void)
CLRWDT
__endasm;
+ // wade : start
+ // sci_sendchar(FCHANGE);
+ // wade : end
+
//-- Analize serial port waiting to a frame
if (RCIF == 1) // Yes--> Service of platform status
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]