Author: jsuijs
Date: Sun Nov 30 07:33:24 2008
New Revision: 601

Modified:
    trunk/unvalidated/sample/test/board/board_16f648a_js.jal
    trunk/unvalidated/sample/test/board/board_16f877a_dwarf.jal
    trunk/unvalidated/sample/test/board/board_16f88_js.jal
    trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_hw_l0.jal
    trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_hw_l1.jal
    trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_sw_l0.jal
    trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_sw_l1.jal
    trunk/unvalidated/sample/test/peripheral/pwm/test_pwm1.jal
    trunk/unvalidated/sample/test/peripheral/pwm/test_pwm2.jal

Log:
board file & test files prepared for sample generation

Modified: trunk/unvalidated/sample/test/board/board_16f648a_js.jal
==============================================================================
--- trunk/unvalidated/sample/test/board/board_16f648a_js.jal    (original)
+++ trunk/unvalidated/sample/test/board/board_16f648a_js.jal    Sun Nov 30  
07:33:24 2008
@@ -1,75 +1 @@
--- ------------------------------------------------------
--- Title: BOARD FILE for [see filename]
--- Author: Joep Suijs, Copyright (c) 2008..2008, all rights reserved.
--- Adapted-by:
--- Compiler: >=2.4g
---
--- This file is part of jallib  (http://jallib.googlecode.com)
--- Released under the BSD license  
(http://www.opensource.org/licenses/bsd-license.php)
---
--- Description: This file defines the configuration of a specific  
test-board.
--- --
--- BOARD DESCRIPTION
--- -----------------
--- --
--- * Darf board connector D0 t/m D7 pin-out of the test board:
---       D0 A0
---       D1 A1
---       D2 A2
---       D3 A3
---       D4 B0
---       D5 B4
---       D6 B3
---       D7 B1
--- --
--- * 20 MHz resonator
--- --
--- Dwarf LCD connection (with 2 additional LEDS)
--- D0 t/m D3   = dataport high nibble
--- D4          = E
--- D5          = RS
--- D6, D7      = led
---
--- Sources:
---
--- Notes:
---
--- ------------------------------------------------------
-
--- chip setup
-include 16f648a
-
---
--- This program assumes a 20 MHz resonator or crystal
--- is connected to pins OSC1 and OSC2.
-pragma target OSC HS               -- HS crystal or resonator
-pragma target clock 20_000_000     -- oscillator frequency
-pragma target WDT  disabled
-pragma target LVP  disabled
-
--- LED setup
-var bit led           is pin_b3   -- alias
-var bit led_direction is pin_b3_direction
-
--- PWM setup
-;var bit pwm_direction = pin_b0_direction
-
--- LCD setup
-var bit lcd_rs               is pin_b4 -- LCD command/data select.
-var bit lcd_rs_direction is pin_b4_direction
-var bit lcd_en           is pin_b0 -- LCD data trigger
-var bit lcd_en_direction is pin_b0_direction
-
-var byte lcd_dataport is porta_low -- LCD data  port
-var byte lcd_dataport_direction is porta_low_direction -- LCD data  port
-const byte LCD_ROWS     = 2                   -- 2 lines
-const byte LCD_CHARS    = 16                  -- 16 chars per line
-
--- I2C setup
-var volatile bit i2c_scl            is pin_b4
-var volatile bit i2c_scl_direction  is pin_b4_direction
-var volatile bit i2c_sda            is pin_b3
-var volatile bit i2c_sda_direction  is pin_b3_direction
-
--- ccp setup
-var volatile bit pin_ccp1_direction is pin_b3_direction
+-- ------------------------------------------------------
-- Title: BOARD FILE for [see filename]
-- Author: Joep Suijs, Copyright (c) 2008..2008, all rights reserved.
-- Adapted-by:
-- Compiler: >=2.4g
--
-- This file is part of jallib  (http://jallib.googlecode.com)
-- Released under the BSD license  
(http://www.opensource.org/licenses/bsd-license.php)
--
-- Description: This file defines the configuration of a specific  
test-board.
-- --
-- BOARD DESCRIPTION
-- -----------------
-- --
-- * Darf board connector D0 t/m D7 pin-out of the test board:
--       D0 A0
--       D1 A1
--       D2 A2
--       D3 A3
--       D4 B0
--       D5 B4
--       D6 B3
--       D7 B1
-- --
-- * 20 MHz resonator
-- --
-- Dwarf LCD connection (with 2 additional LEDS)
-- D0 t/m D3   = dataport high nibble
-- D4          = E
-- D5          = RS
-- D6, D7      = led
--
-- Sources:
--
-- Notes:
--
-- ------------------------------------------------------

;@jallib section chipdef
-- chip setup
include 16f648a

--
-- This program assumes a 20 MHz resonator or crystal
-- is connected to pins OSC1 and OSC2.
pragma target OSC HS               -- HS crystal or resonator
pragma target clock 20_000_000     -- oscillator frequency
pragma target WDT  disabled
pragma target LVP  disabled


;@jallib section led
-- LED IO definition
var bit led           is pin_b3
var bit led_direction is pin_b3_direction

;@jallib section lcd_hd44780_4
-- LCD IO definition
var bit lcd_rs           is pin_b4              -- LCD command/data select.
var bit lcd_rs_direction is pin_b4_direction
var bit lcd_en           is pin_b0              -- LCD data trigger
var bit lcd_en_direction is pin_b0_direction

var byte lcd_dataport is porta_low              -- LCD data  port
var byte lcd_dataport_direction is porta_low_direction
const byte LCD_ROWS     = 2                     -- 2 lines
const byte LCD_CHARS    = 16                    -- 16 chars per line

;@jallib section i2c
-- I2C io definition
var volatile bit i2c_scl            is pin_b4
var volatile bit i2c_scl_direction  is pin_b4_direction
var volatile bit i2c_sda            is pin_b3
var volatile bit i2c_sda_direction  is pin_b3_direction

;@jallib section ccp
-- ccp setup
var volatile bit pin_ccp1_direction is pin_b3_direction
\ No newline at end of file

Modified: trunk/unvalidated/sample/test/board/board_16f877a_dwarf.jal
==============================================================================
--- trunk/unvalidated/sample/test/board/board_16f877a_dwarf.jal (original)
+++ trunk/unvalidated/sample/test/board/board_16f877a_dwarf.jal Sun Nov 30  
07:33:24 2008
@@ -1,7 +1,7 @@
  -- ------------------------------------------------------
  -- Title: BOARD FILE for [see filename]
  -- Author: Joep Suijs, Copyright (c) 2008..2008, all rights reserved.
--- Adapted-by:
+-- Adapted-by:
  -- Compiler: >=2.4g
  --
  -- This file is part of jallib  (http://jallib.googlecode.com)
@@ -15,46 +15,47 @@
  -- DB01 - Dwarf board for 40pin pic
  -- DBxx (8 leds) on port A
  -- DB017 (LCD) on port B
---
+--
  -- Sources:
  --
  -- Notes:
  --
  -- ------------------------------------------------------

+;@jallib section chipdef
  -- chip setup
-include 16f877a
+include 16f877a

  pragma target clock 20_000_000                  -- xtal frequency
  pragma target OSC        hs
  pragma target   LVP disabled
  pragma target   WDT disabled

--- LED setup
-var bit led           is pin_a0
+;@jallib section led
+-- LED IO definition
+var bit led           is pin_a0
  var bit led_direction is pin_a0_direction

--- PWM setup
-var bit pwm_direction = pin_b0_direction
-;pin_b0_direction = output
-
--- LCD setup
-var bit lcd_rs           is pin_b5 -- LCD command/data select.
-var bit lcd_rs_direction is pin_b5_direction
-var bit lcd_en           is pin_b4 -- LCD data trigger
-var bit lcd_en_direction is pin_b4_direction
-
-var byte lcd_dataport is portb_low -- LCD data  port
-var byte lcd_dataport_direction is portb_low_direction -- LCD data  port
-const byte LCD_ROWS     = 2                   -- 2 lines
-const byte LCD_CHARS    = 16                  -- 16 chars per line
+;@jallib section lcd_hd44780_4
+-- LCD IO definition
+var bit lcd_rs           is pin_b5              -- LCD command/data select.
+var bit lcd_rs_direction is pin_b5_direction
+var bit lcd_en           is pin_b4              -- LCD data trigger
+var bit lcd_en_direction is pin_b4_direction
+
+var byte lcd_dataport is portb_low              -- LCD data  port
+var byte lcd_dataport_direction is portb_low_direction
+const byte LCD_ROWS     = 2                     -- 2 lines
+const byte LCD_CHARS    = 16                    -- 16 chars per line

--- I2C setup
+;@jallib section i2c
+-- I2C io definition
  var volatile bit i2c_scl            is pin_c3
  var volatile bit i2c_scl_direction  is pin_c3_direction
  var volatile bit i2c_sda            is pin_c4
  var volatile bit i2c_sda_direction  is pin_c4_direction

+;@jallib section ccp
  -- ccp setup
  var volatile bit pin_ccp1_direction is pin_c2_direction
-var volatile bit pin_ccp2_direction is pin_c1_direction
\ No newline at end of file
+var volatile bit pin_ccp2_direction is pin_c1_direction

Modified: trunk/unvalidated/sample/test/board/board_16f88_js.jal
==============================================================================
--- trunk/unvalidated/sample/test/board/board_16f88_js.jal      (original)
+++ trunk/unvalidated/sample/test/board/board_16f88_js.jal      Sun Nov 30  
07:33:24 2008
@@ -1,7 +1,7 @@
  -- ------------------------------------------------------
  -- Title: BOARD FILE for [see filename]
  -- Author: Joep Suijs, Copyright (c) 2008..2008, all rights reserved.
--- Adapted-by:
+-- Adapted-by:
  -- Compiler: >=2.4g
  --
  -- This file is part of jallib  (http://jallib.googlecode.com)
@@ -29,7 +29,7 @@
  -- D4          = E
  -- D5          = RS
  -- D6, D7      = led
---
+--
  -- Sources:
  --
  -- Notes:
@@ -40,6 +40,7 @@
  -- chip setup
  include 16f88

+--
  -- This program assumes a 20 MHz resonator or crystal
  -- is connected to pins OSC1 and OSC2.
  pragma target OSC       HS             -- HS crystal or resonator
@@ -49,30 +50,33 @@
  pragma target CCP1MUX   RB3            -- ccp1 pin on B3

  ;@jallib section led
--- LED IO definition
-var bit led           is pin_b3                          -- led pin
+-- LED IO definition
+var bit led           is pin_b3
  var bit led_direction is pin_b3_direction

  ;@jallib section lcd_hd44780_4
  -- LCD IO definition
-var bit lcd_rs           is pin_b4                       -- LCD  
command/data select.
-var bit lcd_rs_direction is pin_b4_direction
-var bit lcd_en           is pin_b0                       -- LCD data  
trigger
-var bit lcd_en_direction is pin_b0_direction
+var bit lcd_rs           is pin_b4              -- LCD command/data select.
+var bit lcd_rs_direction is pin_b4_direction
+var bit lcd_en           is pin_b0              -- LCD data trigger
+var bit lcd_en_direction is pin_b0_direction

-var byte lcd_dataport is porta_low                       -- LCD data  port
+var byte lcd_dataport is porta_low              -- LCD data  port
  var byte lcd_dataport_direction is porta_low_direction
-
-const byte LCD_ROWS     = 2                              -- 2 lines
-const byte LCD_CHARS    = 16                             -- 16 chars per  
line
+const byte LCD_ROWS     = 2                     -- 2 lines
+const byte LCD_CHARS    = 16                    -- 16 chars per line

  ;@jallib section i2c
  -- I2C io definition
-var volatile bit i2c_scl            is pin_b4            -- i2c scl pin
+var volatile bit i2c_scl            is pin_b4
  var volatile bit i2c_scl_direction  is pin_b4_direction
-var volatile bit i2c_sda            is pin_b3            -- i2c sda pin
-var volatile bit i2c_sda_direction  is pin_b3_direction

-;@jallib section ccp1
--- ccp1 setup
-var volatile bit pin_ccp1_direction is pin_b3_direction  -- ccp1 pin
+-- b3 is pin-compatible with 16f648a board file, b1 is on hardware pins
+;var volatile bit i2c_sda            is pin_b3
+;var volatile bit i2c_sda_direction  is pin_b3_direction
+var volatile bit i2c_sda            is pin_b1
+var volatile bit i2c_sda_direction  is pin_b1_direction
+
+;@jallib section ccp
+-- ccp setup
+var volatile bit pin_ccp1_direction is pin_b3_direction

Modified: trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_hw_l0.jal
==============================================================================
--- trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_hw_l0.jal      
(original)
+++ trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_hw_l0.jal     Sun Nov 
 
30 07:33:24 2008
@@ -24,6 +24,7 @@
  --         a serial connection to a terminal
  --
  -- ------------------------------------------------------
+;@jallib section i2c

  -- generic setup (see releated examples for more details)
  const usart_hw_serial = true  -- true = RS232, false = SPI

Modified: trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_hw_l1.jal
==============================================================================
--- trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_hw_l1.jal      
(original)
+++ trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_hw_l1.jal     Sun Nov 
 
30 07:33:24 2008
@@ -24,6 +24,7 @@
  --         a serial connection to a terminal
  --
  -- ------------------------------------------------------
+;@jallib section i2c

  -- generic setup (see releated examples for more details)
  const usart_hw_serial = true  -- true = RS232, false = SPI
@@ -37,8 +38,8 @@
  const word _i2c_bus_speed = 1 ; * 100kHz
  const bit _i2c_level = true   ; i2c levels (not SMB)

-include i2c_software
-;include i2c_hardware
+;include i2c_software
+include i2c_hardware

  i2c_initialize()


Modified: trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_sw_l0.jal
==============================================================================
--- trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_sw_l0.jal      
(original)
+++ trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_sw_l0.jal     Sun Nov 
 
30 07:33:24 2008
@@ -24,6 +24,7 @@
  --         a serial connection to a terminal
  --
  -- ------------------------------------------------------
+;@jallib section i2c

  -- generic setup (see releated examples for more details)
  const usart_hw_serial = true  -- true = RS232, false = SPI

Modified: trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_sw_l1.jal
==============================================================================
--- trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_sw_l1.jal      
(original)
+++ trunk/unvalidated/sample/test/peripheral/i2c/test_i2c_sw_l1.jal     Sun Nov 
 
30 07:33:24 2008
@@ -24,6 +24,7 @@
  --         a serial connection to a terminal
  --
  -- ------------------------------------------------------
+;@jallib section i2c

  -- generic setup (see releated examples for more details)
  const usart_hw_serial = true  -- true = RS232, false = SPI

Modified: trunk/unvalidated/sample/test/peripheral/pwm/test_pwm1.jal
==============================================================================
--- trunk/unvalidated/sample/test/peripheral/pwm/test_pwm1.jal  (original)
+++ trunk/unvalidated/sample/test/peripheral/pwm/test_pwm1.jal  Sun Nov 30  
07:33:24 2008
@@ -17,6 +17,8 @@
  -- Notes: setup: a led on ccp1
  --
  -- ------------------------------------------------------
+;@jallib section ccp
+
  enable_digital_io()

  -- Configure PWM

Modified: trunk/unvalidated/sample/test/peripheral/pwm/test_pwm2.jal
==============================================================================
--- trunk/unvalidated/sample/test/peripheral/pwm/test_pwm2.jal  (original)
+++ trunk/unvalidated/sample/test/peripheral/pwm/test_pwm2.jal  Sun Nov 30  
07:33:24 2008
@@ -17,6 +17,7 @@
  -- Notes: setup: a led on ccp2
  --
  -- ------------------------------------------------------
+;@jallib section ccp

  enable_digital_io()


--~--~---------~--~----~------------~-------~--~----~
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