Author: jsuijs
Date: Mon Oct 6 11:02:56 2008
New Revision: 358
Added:
trunk/unvalidated/sample/test/board/board_16f648a_js.jal
trunk/unvalidated/sample/test/board/board_16f877a_dwarf.jal
trunk/unvalidated/sample/test/external/lcd/test_lcd.jal
trunk/unvalidated/sample/test/jal/test_blink.jal
Removed:
trunk/tools/test_setup/
Log:
just moved some files
Added: trunk/unvalidated/sample/test/board/board_16f648a_js.jal
==============================================================================
--- (empty file)
+++ trunk/unvalidated/sample/test/board/board_16f648a_js.jal Mon Oct 6
11:02:56 2008
@@ -0,0 +1,68 @@
+--
--------------------------------------------------------------------------
+-- BOARD FILE
+--
--------------------------------------------------------------------------
+-- This file defines the configuration of a specific
+-- test-board for JALLIB testing.
+--
+-- 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
+--
+--
+-- At the end, include a specific test.
+--
--------------------------------------------------------------------------
+
+-- 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 RS is pin_b4 -- LCD command/data select.
+var bit lcd_RS_direction is pin_b4_direction
+var bit EN is pin_b0 -- LCD data trigger
+var bit lcd_EN_direction is pin_b0_direction
+
+var byte data_port is porta_low -- LCD data port
+var bit lcd_d4_direction is pin_a0_direction
+var bit lcd_d5_direction is pin_a1_direction
+var bit lcd_d6_direction is pin_a2_direction
+var bit lcd_d7_direction is pin_a3_direction
+
+
+-- ----------------------------------------------
+-- setup end; include generic test programs below
+-- ----------------------------------------------
+
+include test_hello_world_lcd
+;include test_blink
\ No newline at end of file
Added: trunk/unvalidated/sample/test/board/board_16f877a_dwarf.jal
==============================================================================
--- (empty file)
+++ trunk/unvalidated/sample/test/board/board_16f877a_dwarf.jal Mon Oct 6
11:02:56 2008
@@ -0,0 +1,64 @@
+--
--------------------------------------------------------------------------
+-- BOARD FILE
+--
--------------------------------------------------------------------------
+-- This file defines the configuration of a specific
+-- test-board for JALLIB testing.
+--
+-- DB01 - Dwarf board for 40pin pic
+-- DBxx (8 leds) on port A
+-- DB017 (LCD) on port B
+--
+--
--------------------------------------------------------------------------
+-- At the end, include a specific test.
+--
--------------------------------------------------------------------------
+
+-- chip setup
+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
+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 RS is pin_b5 -- LCD command/data select.
+var bit lcd_RS_direction is pin_b5_direction
+var bit EN is pin_b4 -- LCD data trigger
+var bit lcd_EN_direction is pin_b4_direction
+
+var byte data_port is portb_low -- LCD data port
+var bit lcd_d4_direction is pin_b0_direction
+var bit lcd_d5_direction is pin_b1_direction
+var bit lcd_d6_direction is pin_b2_direction
+var bit lcd_d7_direction is pin_b3_direction
+
+procedure set_lcd_io () is
+ pin_b0_direction = output
+ pin_b1_direction = output
+ pin_b2_direction = output
+ pin_b3_direction = output
+ pin_b4_direction = output
+ pin_b5_direction = output
+end procedure
+
+
+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
+
+
+-- ----------------------------------------------
+-- setup end; include generic test programs below
+-- ----------------------------------------------
+
+;include test_hello_world_lcd
+;include test_blink
\ No newline at end of file
Added: trunk/unvalidated/sample/test/external/lcd/test_lcd.jal
==============================================================================
--- (empty file)
+++ trunk/unvalidated/sample/test/external/lcd/test_lcd.jal Mon Oct 6
11:02:56 2008
@@ -0,0 +1,43 @@
+-- prog.jal, to test LCD
+include delay_any_mc
+
+enable_digital_io()
+
+lcd_RS_direction = output
+lcd_EN_direction = output
+lcd_d4_direction = output
+lcd_d5_direction = output
+lcd_d6_direction = output
+lcd_d7_direction = output
+
+include lcd -- LCD library
+include print -- output library
+
+led_direction = output
+for 4 loop
+ LED = on
+ delay_100ms(3)
+ LED = off
+ delay_100ms(3)
+end loop
+
+
+const byte str1[] = "Hello world" -- define a string
+print_string(lcd, str1) -- output string to LCD
+
+var byte counter = 0
+
+forever loop -- loop forever
+
+ lcdsetcursor(1, 0)
+ print_byte_hex(lcd, counter) -- output in hex format
+ counter = counter + 1
+ delay_100ms(2)
+
+end loop
+
+
+
+
+
+
Added: trunk/unvalidated/sample/test/jal/test_blink.jal
==============================================================================
--- (empty file)
+++ trunk/unvalidated/sample/test/jal/test_blink.jal Mon Oct 6 11:02:56
2008
@@ -0,0 +1,31 @@
+-- ------------------------------------------------------
+-- Title: Blink-an-LED of the Microchip PIC16f628a
+--
+-- Author: Rob Hamerling, 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: Sample blink-an-LED program for Microchip PIC16f628a
+--
+-- Sources:
+--
+-- Notes:
+-- - File creation date/time: 22 Aug 2008 13:36:27.
+--
+-- ------------------------------------------------------
+
+--
+led_direction = output
+--
+forever loop
+ led = on
+ _usec_delay(250000)
+ led = off
+ _usec_delay(250000)
+end loop
+--
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---