Yesterday i received the easypic4.
And i am looking for examples in PBP , for 16f628a - 16f88 - 16f876a - 16f877a - 12f675 - 12f629
Yesterday i received the easypic4.
And i am looking for examples in PBP , for 16f628a - 16f88 - 16f876a - 16f877a - 12f675 - 12f629
well i could, what you're looking for?
I suggest you read the Jumper settings as there's a few tons of possibilities. Socket Selection, PGM selection, pull-up/down etc etc etc
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
The problem here is that the EasyPIC boards are supplied by the same company that supplied Mikrobasic, and most of the examples on their website and in the manual is written in this code and NOT PicBASIC pro. It should be a fairly easy task to follow any comments in the Mikrobasic manual and write your own examples in PBP.
The other suggestion would be to search this forum for examples of using RS232, A/D etc and then configure the EasyPIC board to suit the project that is detailed in each thread....
The simple way to start is with the flashing of one of the many LEDs on the board.. then work your way up
Try this to blink LEDs. 16f877A, 8mhz, HS osc, SW2=00001111. It started out to blink 1 led and grew to this.Crude but effective.
Why don't they all blink? You can figure that out.
Hope this helps.
Hi All
I created this file to hilp speed up the coding process using the easypic 7.
I hope it help's you as well
Ron
'************************************************* ****
'* Name : EASYPIC7_DEFS.BAS
'* Author : Ron
'* Date : 11/27/2012
'* Version : 1.0
'* Notes
'*
'************************************************* ****
'' DEFINE SER2
'symbol baud = B9600+no_parity+Driven+Inverted
'DEFINE SER2_BITS 9
'pinout VAR PORTC.7
''************************************************ ******
'' DEFINE DEBUG
'DEFINE DEBUG_REG PORTD 'Debug pin port
'DEFINE DEBUG_BIT 6 'Debug pin bit
'DEFINE DEBUG_BAUD 9600 'Debug baud rate
'DEFINE DEBUG_MODE 1 'Debug mode: 0 = True, 1 = Inverted
'DEFINE DEBUG_PACING 1000 'Debug character pacing in us
''************************************************ ******
'' DEFINE baud
'------------------------------------
'dec
'B1200 CON 813 'Bit 1 - 12
'B2400 CON 396
'B4800 CON 188
'B9600 CON 84
'B19200 CON 32
'B38400 CON 6
'even_parity CON 8192 'Bit 13 = 1
'no_parity CON 0 'Bit 13 = 0
'Inverted CON 16384'Bit 14 = 1 Driven Inverted
'non_Inverted CON 0 'Bit 14 = 0 Driven non Inverted
'non_Driven CON 32768 'Bit 15 = 1 non Driven
'Driven CON 0 'Bit 15 = 0 Driven
'baud = B9600+no_parity+Driven+Inverted
'------------------------------------
'hex
'B1200 CON $32D 'Bit 1 - 12
'B2400 CON $18C
'B4800 CON $BC
'B9600 CON $54
'B19200 CON $20
'B38400 CON $6
'even_parityCON $2000 'Bit 13 = 1
'no_parity CON 0 'Bit 13 = 0
'Inverted CON $4000`'Bit 14 = 1 Inverted
'non_Inverted CON 0 'Bit 14 = 0 non Inverted
'non_Driven CON $8000`'Bit 15 = 1 non Driven
'Driven CON 0 'Bit 15 = 0 Driven
'baud = B9600+no_parity+Driven+Inverted
''************************************************ ******
'' DEFINE rs232 and USB
'so VAR PORTA.2
'so VAR PORTB.1
'so VAR PORTB.2
'so VAR PORTB.5
'so VAR PORTB.7
'so VAR PORTC.4
'so VAR PORTC.6
'so VAR PORTD.6
'si VAR PORTA.3
'si VAR PORTB.1
'si VAR PORTB.2
'si VAR PORTB.4
'si VAR PORTB.5
'si VAR PORTC.5
'si VAR PORTC.7
'si VAR PORTD.7
''************************************************ ******
'' DEFINE serial lcd
'' DEFINE 2X16 lcd
'include "C:\Program Files\Mecanique\MCS\lcd_defs.pbp"
'DEFINE LCD_DREG PORTB 'LCD data port
'DEFINE LCD_DBIT 0 'LCD data starting bit 0 or 4
'DEFINE LCD_RSREG PORTB 'LCD register select port
'DEFINE LCD_RSBIT 4 ' LCD register select bit
'DEFINE LCD_EREG PORTB 'LCD enable port
'DEFINE LCD_EBIT 5 'LCD enable bit
'DEFINE LCD_BITS 4 'LCD bus size 4 or 8
'DEFINE LCD_LINES 2 'Number lines on LCD
'DEFINE LCD_COMMANDUS 2000 'Command delay time in us
'DEFINE LCD_DATAUS 50 'Data delay time in us
'ANSEL = 0 ' Configure AN pins as digital I/O
'ANSELH = 0
''************************************************ ******
'' DEFINE Glcd
''Define GLCD registers and bits
'DEFINE GLCD_DREG PORTD ' Set LCD Data port
'DEFINE GLCD_DREG 0 ' Set starting Data bit bus
'DEFINE GLCD_RSREG PORTB ' Set LCD Register Select port
'DEFINE GLCD_RSBITG 5 ' Set LCD Register Select bit
'DEFINE GLCD_EREG PORTB ' Set LCD Enable port
'DEFINE GLCD_EBIT 4 ' Set LCD Enable bit
'DEFINE GLCD_EREG PORTB
'DEFINE GLCD_RWBIT 3 '
'DEFINE GLCD_CS1REG PORTB
'DEFINE GLCD_CS1BIT 0 '
'DEFINE GLCD_CS2REG PORTB
'DEFINE GLCD_CS2BIT 1 '
'************************************************* ******
'' DEFINE tuch pannel
'Symbol BOTTOM = PORTA.0
'Symbol LEFT = PORTA.1
'Symbol DriveA = PORTC.0
'Symbol DriveB = PORTC.1
''************************************************ ******
'' DEFINE 7-seg display
'Segments Var PORTD
'Digits Var PORTA
'LOOKUP n, [$3F, $06, $5B, $4F, $66, $6D, $7D, $07, $7F, $6F], Segments
'LOOKUP n, [63, 6, 91, 79, 102, 109, 125, 7, 127, 111], Segments
' 0-9 LOOKUP RD0
'' 1 1 1 1 1 1 1 1 RD5 RD1
' 128 64 32 16 8 4 2 1 RD6
' DPRD7 RD6 RD5 RD4 RD3 RD2 RD1 RD0 RD4 RD2
RD3
RD7
''************************************************ ******
'' DEFINE lm35
'lm35_pin VAR PORTE.1
'lm35_pin VAR PORTE.2
''************************************************ ******
'' DEFINE DS1820
'DS1820_pin VAR PORTA.4
'DS1820_pin VAR PORTE.2
''************************************************ ******
'' DEFINE adc
'Define ADC_BITS 10 ' Set number of bits in result
'Define ADC_CLOCK 3 ' Set clock source (3=rc)
'Define ADC_SAMPLEUS 50 ' Set sampling time in uS
'adc1_pin VAR PORTA.1
'adc1_pin VAR PORTA.2
'adc1_pin VAR PORTA.3
'adc1_pin VAR PORTA.4
'adc1_pin VAR PORTA.5
'adc2_pin VAR PORTB.1
'adc2_pin VAR PORTB.2
'adc2_pin VAR PORTB.3
'adc2_pin VAR PORTB.4
'adc2_pin VAR PORTB.5
''************************************************ ******
'' DEFINE I2C
'SCL VAR PORTC.3
SDA VAR PORTC.4
''************************************************ ******
????????
'CS Var PORTA.5 ' Chip select pin
'SCK Var PORTC.3 ' Clock pin
'SI Var PORTC.4 ' Data in pin
'SO Var PORTC.5 ' Data out pin
''************************************************ ******
'' DEFINE buzzer
'buzzer_pin VAR PORTC.2
'buzzer_pin VAR PORTE.1
''************************************************ ******
'' DEFINE BUTTIONS
PORT VAR PORTB
'PB0 VAR PORT.0
'PB1 VAR PORT.1
'PB2 VAR PORT.2
'PB3 VAR PORT.3
'PB4 VAR PORT.4
'PB5 VAR PORT.5
'PB6 VAR PORT.6
'PB7 VAR PORT.7
''************************************************ *****
'' DEFINE LEDS
PORT VAR PORTA
'LED0 VAR PORT.0
'LED1 VAR PORT.1
'LED2 VAR PORT.2
'LED3 VAR PORT.3
'LED4 VAR PORT.4
'LED5 VAR PORT.5
'LED6 VAR PORT.6
'LED7 VAR PORT.7
''************************************************ ******
''exterbal device def
''************************************************ ******
'' DEFINE serial lcd
'symbol lcd_baud = B9600+no_parity+Driven+Inverted
'DEFINE SER2_BITS 9
'Symbol pinout = PORTD.7
'SEROUT2 pinout,lcd_baud,[17 ,1, 18] 'cls lcd1
'SEROUT2 pinout,lcd_baud,[17,192,18] 'lf lcd1
'SEROUT2 pinout,lcd_baud,[21 ,1, 22] 'cls lcd2
'SEROUT2 pinout,lcd_baud,[21,192,22] 'lf lcd2
''************************************************ ******
'' RTC2
'SCL VAR PORTC.3
'SDA VAR PORTC.4
''************************************************ *****
'' DEFINE keyupad
PORT VAR PORTA
'COL1 VAR PORT.0
'COL2 VAR PORT.1
'COL3 VAR PORT.2
'COLA VAR PORT.3
'ROW1 VAR PORT.4
'ROW4 VAR PORT.5
'ROW7 VAR PORT.6
'ROW0 VAR PORT.7
''************************************************ *****''******************************************* **********
'' END
Bookmarks