Revision: 1311
Author: [email protected]
Date: Tue Sep  8 13:47:22 2009
Log: fix autostart issue
http://code.google.com/p/jallib/source/detail?r=1311

Modified:
  /trunk/sample/18f14k50_usb_bootloader_autostart.jal
  /trunk/sample/18f2450_usb_bootloader_autostart.jal
  /trunk/sample/18f4550_usb_bootloader_autostart.jal
  /trunk/test/peripheral/usb/test_usb_bootloader_autostart.jal

=======================================
--- /trunk/sample/18f14k50_usb_bootloader_autostart.jal Tue Sep  8 12:50:56  
2009
+++ /trunk/sample/18f14k50_usb_bootloader_autostart.jal Tue Sep  8 13:47:22  
2009
@@ -38,7 +38,7 @@
  -- needed to get compact code, bootloader has to
  -- fit within first 2048 bytes in order to be
  -- compatible with default of PDFSUSB
--- currently only 14 bytes left (2010 bytes)
+-- currently only 2 bytes left (2022 bytes)
  PRAGMA OPT CONST_DETECT YES


@@ -687,11 +687,15 @@
  -- check if highest part of goto instruction
  -- if bytes are set to 0xFFFF, then disable
  -- timer
-var volatile byte goto_hvec_0 at 0x802
-var volatile byte goto_hvec_1 at 0x803
-
-if goto_hvec_0 == 0xFF then
-   if goto_hvec_1 == 0xFF then
+
+TBLPTRU = 0x00
+TBLPTRH = 0x08
+TBLPTRL = 0x02
+
+asm TBLRD*+
+if TABLAT == 0xFF then
+   asm TBLRD*+
+   if TABLAT == 0xFF then
         T1CON = 0x00
     end if
  end if
=======================================
--- /trunk/sample/18f2450_usb_bootloader_autostart.jal  Tue Sep  8 12:50:56  
2009
+++ /trunk/sample/18f2450_usb_bootloader_autostart.jal  Tue Sep  8 13:47:22  
2009
@@ -38,7 +38,7 @@
  -- needed to get compact code, bootloader has to
  -- fit within first 2048 bytes in order to be
  -- compatible with default of PDFSUSB
--- currently only 14 bytes left (2010 bytes)
+-- currently only 2 bytes left (2022 bytes)
  PRAGMA OPT CONST_DETECT YES


@@ -682,11 +682,15 @@
  -- check if highest part of goto instruction
  -- if bytes are set to 0xFFFF, then disable
  -- timer
-var volatile byte goto_hvec_0 at 0x802
-var volatile byte goto_hvec_1 at 0x803
-
-if goto_hvec_0 == 0xFF then
-   if goto_hvec_1 == 0xFF then
+
+TBLPTRU = 0x00
+TBLPTRH = 0x08
+TBLPTRL = 0x02
+
+asm TBLRD*+
+if TABLAT == 0xFF then
+   asm TBLRD*+
+   if TABLAT == 0xFF then
         T1CON = 0x00
     end if
  end if
=======================================
--- /trunk/sample/18f4550_usb_bootloader_autostart.jal  Tue Sep  8 12:50:56  
2009
+++ /trunk/sample/18f4550_usb_bootloader_autostart.jal  Tue Sep  8 13:47:22  
2009
@@ -38,7 +38,7 @@
  -- needed to get compact code, bootloader has to
  -- fit within first 2048 bytes in order to be
  -- compatible with default of PDFSUSB
--- currently only 14 bytes left (2010 bytes)
+-- currently only 2 bytes left (2022 bytes)
  PRAGMA OPT CONST_DETECT YES


@@ -690,11 +690,15 @@
  -- check if highest part of goto instruction
  -- if bytes are set to 0xFFFF, then disable
  -- timer
-var volatile byte goto_hvec_0 at 0x802
-var volatile byte goto_hvec_1 at 0x803
-
-if goto_hvec_0 == 0xFF then
-   if goto_hvec_1 == 0xFF then
+
+TBLPTRU = 0x00
+TBLPTRH = 0x08
+TBLPTRL = 0x02
+
+asm TBLRD*+
+if TABLAT == 0xFF then
+   asm TBLRD*+
+   if TABLAT == 0xFF then
         T1CON = 0x00
     end if
  end if
=======================================
--- /trunk/test/peripheral/usb/test_usb_bootloader_autostart.jal        Tue Sep 
 8  
12:50:56 2009
+++ /trunk/test/peripheral/usb/test_usb_bootloader_autostart.jal        Tue Sep 
 8  
13:47:22 2009
@@ -32,7 +32,7 @@
  -- needed to get compact code, bootloader has to
  -- fit within first 2048 bytes in order to be
  -- compatible with default of PDFSUSB
--- currently only 14 bytes left (2010 bytes)
+-- currently only 2 bytes left (2022 bytes)
  PRAGMA OPT CONST_DETECT YES


@@ -635,11 +635,15 @@
  -- check if highest part of goto instruction
  -- if bytes are set to 0xFFFF, then disable
  -- timer
-var volatile byte goto_hvec_0 at 0x802
-var volatile byte goto_hvec_1 at 0x803
-
-if goto_hvec_0 == 0xFF then
-   if goto_hvec_1 == 0xFF then
+
+TBLPTRU = 0x00
+TBLPTRH = 0x08
+TBLPTRL = 0x02
+
+asm TBLRD*+
+if TABLAT == 0xFF then
+   asm TBLRD*+
+   if TABLAT == 0xFF then
         T1CON = 0x00
     end if
  end if

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to