Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added missing blink samples defined in TORLEASE
- Loading branch information
1 parent
5e297b4
commit db21267
Showing
2 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
-- ------------------------------------------------------ | ||
-- Title: Blink-a-led of the Microchip pic18lf242 | ||
-- | ||
-- Author: Rob Hamerling, Copyright (c) 2008..2018 all rights reserved. | ||
-- | ||
-- Adapted-by: | ||
-- | ||
-- Revision: $Revision$ | ||
-- | ||
-- Compiler:2.4q6 | ||
-- | ||
-- This file is part of jallib (https://github.com/jallib/jallib) | ||
-- Released under the BSD license (http://www.opensource.org/licenses/bsd-license.php) | ||
-- | ||
-- Description: | ||
-- Simple blink-a-led program for Microchip pic18lf242 | ||
-- using an external crystal or resonator. | ||
-- The LED should be flashing twice a second! | ||
-- | ||
-- Sources: | ||
-- | ||
-- Notes: | ||
-- - Creation date/time: Sat Jun 16 16:04:12 2018 | ||
-- - This file is generated by 'blink-a-led.py' script! Do not change! | ||
-- | ||
-- ------------------------------------------------------ | ||
-- | ||
include 18lf242 -- target PICmicro | ||
-- | ||
-- This program assumes that a 20 MHz resonator or crystal | ||
-- is connected to pins OSC1 and OSC2. | ||
pragma target clock 20_000_000 -- oscillator frequency | ||
-- | ||
pragma target OSC HS -- crystal or resonator | ||
pragma target WDT CONTROL -- watchdog | ||
pragma target DEBUG DISABLED -- no debugging | ||
pragma target BROWNOUT DISABLED -- no brownout reset | ||
pragma target LVP DISABLED -- no low voltage programming | ||
-- | ||
-- The configuration bit settings above are only a selection, sufficient | ||
-- for this program. Other programs may need more or different settings. | ||
-- | ||
WDTCON_SWDTEN = OFF -- disable WDT | ||
OSCCON_SCS = 0 -- select primary oscillator | ||
-- | ||
enable_digital_io() -- make all pins digital I/O | ||
-- | ||
-- A low current (2 mA) led with 2.2K series resistor is recommended | ||
-- since the chosen pin may not be able to drive an ordinary 20mA led. | ||
-- | ||
alias led is pin_A0 -- alias for pin with LED | ||
-- | ||
pin_A0_direction = OUTPUT | ||
-- | ||
forever loop | ||
led = ON | ||
_usec_delay(100_000) | ||
led = OFF | ||
_usec_delay(400_000) | ||
end loop | ||
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
-- ------------------------------------------------------ | ||
-- Title: Blink-a-led of the Microchip pic18lf2480 | ||
-- | ||
-- Author: Rob Hamerling, Copyright (c) 2008..2018 all rights reserved. | ||
-- | ||
-- Adapted-by: | ||
-- | ||
-- Revision: $Revision$ | ||
-- | ||
-- Compiler:2.4q6 | ||
-- | ||
-- This file is part of jallib (https://github.com/jallib/jallib) | ||
-- Released under the BSD license (http://www.opensource.org/licenses/bsd-license.php) | ||
-- | ||
-- Description: | ||
-- Simple blink-a-led program for Microchip pic18lf2480 | ||
-- using an external crystal or resonator. | ||
-- The LED should be flashing twice a second! | ||
-- | ||
-- Sources: | ||
-- | ||
-- Notes: | ||
-- - Creation date/time: Sat Jun 16 16:04:17 2018 | ||
-- - This file is generated by 'blink-a-led.py' script! Do not change! | ||
-- | ||
-- ------------------------------------------------------ | ||
-- | ||
include 18lf2480 -- target PICmicro | ||
-- | ||
-- This program assumes that a 20 MHz resonator or crystal | ||
-- is connected to pins OSC1 and OSC2. | ||
pragma target clock 20_000_000 -- oscillator frequency | ||
-- | ||
pragma target OSC HS -- crystal or resonator | ||
pragma target WDT CONTROL -- watchdog | ||
pragma target XINST DISABLED -- do not use extended instructionset | ||
pragma target DEBUG DISABLED -- no debugging | ||
pragma target BROWNOUT DISABLED -- no brownout reset | ||
pragma target FCMEN DISABLED -- no clock monitoring | ||
pragma target IESO DISABLED -- no int/ext osc switching | ||
pragma target LVP DISABLED -- no low voltage programming | ||
pragma target MCLR EXTERNAL -- external reset | ||
-- | ||
-- The configuration bit settings above are only a selection, sufficient | ||
-- for this program. Other programs may need more or different settings. | ||
-- | ||
WDTCON_SWDTEN = OFF -- disable WDT | ||
OSCCON_SCS = 0 -- select primary oscillator | ||
OSCTUNE_PLLEN = FALSE -- no PLL | ||
-- | ||
enable_digital_io() -- make all pins digital I/O | ||
-- | ||
-- A low current (2 mA) led with 2.2K series resistor is recommended | ||
-- since the chosen pin may not be able to drive an ordinary 20mA led. | ||
-- | ||
alias led is pin_A0 -- alias for pin with LED | ||
-- | ||
pin_A0_direction = OUTPUT | ||
-- | ||
forever loop | ||
led = ON | ||
_usec_delay(100_000) | ||
led = OFF | ||
_usec_delay(400_000) | ||
end loop | ||
-- |