Applications: schematics and software |
Software 68HC11 68HC811: |
Hardware with 68HC11 and 68HC811: |
New projects with 68HC11: |
68HC11 Expanded Board,LCD Relais,DACs, RS232,.. BYTERUNNER Eprom emulator fast and cheap EE16,Eprom emulator for all 16-Bit microcontroller Real-Time Eprom Emulator for engine in motion |

|
The 68HC11 with CAN-CONTROLLER 82527 from Intel. The address $1F00 from GAL address decode This is the CAN-Controller base address cantx.zip (ca. 10.000 Bytes) Transmit-program in assembler 68HC11 expanded board with CAN BUS canrx.zip (ca. 10.000 Bytes) Receive-program in assembler 68HC11 expanded board with CAN BUS |


:285 time PC -> Modem ~ 21 45 00 01 AC 63 07 40 00 20 06 A3 69 D4 D8 20 DE C2 F3 9A 31 04 7F 00 19 00 50 AE E9 47 12 7B B1 50 18 20 E5 65 85 00 00 46 72 6F 6D 3A 20 22 4F 72 67 6C 65 72 20 4C 75 64 77 69 67 22 20 3C 6C 75 64 77 69 67 6F 40 74 69 6E 2E 69 74 3E 0D 0A 54 6F 3A 20 3C 6F 72 67 6C 65 72 40 74 69 6E 2E 69 74 3E 0D 0A 53 75 62 6A 65 63 74 3A 20 54 45 53 54 5F 58 31 0D 0A 44 61 74 65 3A 20 54 68 75 2C 20 33 30 20 4A 75 6C 20 31 39 39 38 20 31 34 3A 34 35 3A 33 39 20 2B 30 32 30 30 0D 0A 58 2D 4D 53 4D 61 69 6C 2D 50 72 69 6F 72 69 74 79 3A 20 4E 6F 72 6D 61 6C 0D 0A 58 2D 50 72 69 6F 72 69 74 79 3A 20 33 0D 0A 58 2D 4D 61 69 6C 65 72 3A 20 4D 69 63 72 6F 73 6F 66 74 20 49 6E 74 65 72 6E 65 74 20 4D 61 69 6C 20 34 2E 37 30 2E 31 31 35 35 0D 0A 4D 49 4D 45 2D 56 65 72 73 69 6F 6E 3A 20 31 2E 30 0D 0A 43 6F 6E 74 65 6E 74 2D 54 79 70 65 3A 20 74 65 78 74 2F 70 6C 61 69 6E 3B 20 63 68 61 72 73 65 74 3D 49 53 4F 2D 38 38 35 39 2D 31 0D 0A 43 6F 6E 74 65 6E 74 2D 54 72 61 6E 73 66 65 72 2D 45 6E 63 6F 64 69 6E 67 3A 20 37 62 69 74 0D 0A 0D 0A 49 4E 50 55 54 20 31 20 3D 20 4F 46 46 0D 0A 49 4E 50 55 54 20 32 20 3D 20 4F 4E 0D 0A 54 45 4D 50 45 52 41 54 55 52 20 31 20 3D 20 32 33 2C 36 20 47 52 41 44 0D 0A 54 45 4D 50 45 52 41 54 55 52 20 32 20 3D 20 31 38 2C 35 20 47 52 41 44 0D 0A 0D 0A AB DF ~SCAN.EXE convert data like:
Nr = 42 ********** :285 time PC -> Modem IP: ~21 45 00 Service Type 01 AC Length dec= 428 63 07 40 00 Identification + Fragm. Offset 20 Time = 06 Protocol = A3 69 Header Checksum D4 D8 20 DE source address dec= 212, 216, 32, 222 C2 F3 9A 31 dest. address dec= 194, 243, 154, 49 ====TCP - Protocol ========== 04 7F source port dec= 1151 00 19 dest.port dec=25 00 50 AE E9 seq. number 47 12 7B B1 ack. number 50 18 data offset +... 20 E5 window 65 85 checksum 00 00 urgent pointer From: "Orgler Ludwig"0D 0ATo: 0D 0ASu bject: TEST_X1 0D 0ADate: Thu, 30 Jul 1998 14:45:39 +0200 0D 0AX-MSMail -Priority: Normal 0D 0AX-Priority: 3 0D 0AX-Mailer: Microsoft Internet Mail 4.70.1155 0D 0AMIME-Version: 1.0 0D 0AContent-Type: text/plain; ch arset=ISO-8859-1 0D 0AContent-Transfer-Encoding: 7bit 0D 0A 0D 0AINPUT 1 = OFF 0D 0AINPUT 2 = ON 0D 0ATEMPERATUR 1 = 23,6 GRAD 0D 0ATEMPERATUR 2 = 18,5 GRAD 0D 0A 0D 0A~

**** #include "address.h"
#define LCDinstr (* (unsigned char*) (0x4000))
#define LCD (* (unsigned char*) (0x4001))
#define TRUE 1
#define PORTA (*(unsigned char*)(0x1000))
#define PIOC (*(unsigned char*)(0x1002))
#define PORTC (*(unsigned char*)(0x1003))
#define PORTB (*(unsigned char*)(0x1004))
#define PORTCL (*(unsigned char*)(0x1005))
#define DDRC (*(unsigned char*)(0x1007))
#define PORTD (*(unsigned char*)(0x1008))
#define DDRD (*(unsigned char*)(0x1009))
#define PORTE (*(unsigned char*)(0x100A))
#define CFORC (*(unsigned char*)(0x100B))
#define OC1M (*(unsigned char*)(0x100C))
#define OC1D (*(unsigned char*)(0x100D))
#define TCNT (*(unsigned char*)(0x100E))
#define TIC1 (*(unsigned char*)(0x1010))
#define TIC2 (*(unsigned char*)(0x1012))
#define TIC3 (*(unsigned char*)(0x1014))
#define TOC1 (*(unsigned char*)(0x1016))
#define TOC2 (*(unsigned char*)(0x1018))
#define TOC3 (*(unsigned char*)(0x101A))
#define TOC4 (*(unsigned char*)(0x101C))
#define TOC5 (*(unsigned char*)(0x101E))
#define TCTL1 (*(unsigned char*)(0x1020))
#define TCTL2 (*(unsigned char*)(0x1021))
#define TMSK1 (*(unsigned char*)(0x1022))
#define TFLG1 (*(unsigned char*)(0x1023))
#define TMSK2 (*(unsigned char*)(0x1024))
#define TFLG2 (*(unsigned char*)(0x1025))
#define PACTL (*(unsigned char*)(0x1026))
#define PACNT (*(unsigned char*)(0x1027))
#define SPCR (*(unsigned char*)(0x1028))
#define SPSR (*(unsigned char*)(0x1029))
#define SPDR (*(unsigned char*)(0x102A))
#define BAUD (*(unsigned char*)(0x102B))
#define SCCR1 (*(unsigned char*)(0x102C))
#define SCCR2 (*(unsigned char*)(0x102D))
#define SCSR (*(unsigned char*)(0x102E))
#define SCDR (*(unsigned char*)(0x102F))
#define ADCTL (*(unsigned char*)(0x1030))
#define ADR1 (*(unsigned char*)(0x1031))
#define ADR2 (*(unsigned char*)(0x1032))
#define ADR3 (*(unsigned char*)(0x1033))
#define ADR4 (*(unsigned char*)(0x1034))
#define OPTION (*(unsigned char*)(0x1039))
#define COPRST (*(unsigned char*)(0x103A))
#define PPROG (*(unsigned char*)(0x103B))
#define HPRIO (*(unsigned char*)(0x103C))
#define INIT (*(unsigned char*)(0x103D))
#define TEST1 (*(unsigned char*)(0x103E))
#define CONFIG (*(unsigned char*)(0x103F))
*********** end of address.h *******
char lcdcontrol;
char LCDBUFFER[32];
void LcdInit(void);
void LcdDelay(void);
void LcdWrite(void);
void LoadLcdBuffer(char *ptr);
const char *const MENUETEXT[]=
{" OS-REALTIME \
NR 1 LCD-INIT "
};
/* BEGIN of MAINPROGRAM */
void main(void)
{
COPRST=0x55;
COPRST=0xAA;
LcdInit();
while(TRUE) /* LOOP */
{
COPRST=0x55;
COPRST=0xAA;
}
}
/* ---------- */
void LcdInit(void)
{
int x,x1;
LCDinstr = 0x30;
LcdDelay();
LCDinstr = 0x30;
LcdDelay();
LCDinstr = 0x30;
LcdDelay();
LCDinstr = 0x38;
LcdDelay();
LCDinstr = 0x0C; /* 00001100 00001DCB D=displ. C=cursor B=blink */
LcdDelay();
LCDinstr = 0x06; /* LCD entry point */
LcdDelay();
LoadLcdBuffer(MENUETEXT[0]);
lcdcontrol=0;
x = 34;
while(x--)
{
LcdWrite();
x1 = 50; while(x1--);
}
}
void LcdDelay(void)
{
int x=200;
while(x--)
{COPRST=0x55;
COPRST=0xAA;
}
}
void LcdWrite(void)
{
if(!lcdcontrol )
{
lcdcontrol = 0x80;
LCDinstr = 0x80;
return;
}
if(lcdcontrol == 0x10) /* NEXTLINE */
{
lcdcontrol |= 0x80;
LCDinstr = 0xC0;
return;
}
LCD = LCDBUFFER [lcdcontrol & 0x1F];
lcdcontrol++;
lcdcontrol &= 0x1F;
}
void LoadLcdBuffer(char *ptr)
{
char xx=0;
while(xx < 32)
{
LCDBUFFER[xx] = *ptr++;
xx++;
}
}
***************** ADDRESS ******************************
LCDinstr EQU $4000 instruction -> LCD
LCD EQU $4001 data -> LCD
*------------------------------------------------------------------------
org $B600
lds #$00FF
*** set expanded multiplexed mode *********
hprio EQU $3C Highest Priority I-Bit and Misc.
ldx #$1000
BSET hprio,X,#00100000B SET TO EXPANDED MULTIPLEXED
BCLR hprio,X,#00010000B
BCLR hprio,X,#01000000B
* ----------------
ldaa #01000000B
clr $1000 -> PWM LCD PORTA
**** the HC11 is now in expanded mode *****
LCD_INIT LDAA #$30 lcd first reset instruction
STAA LCDinstr
JSR lcd_delay
LDAA #$30 after more 4.1msec second lcd reset
STAA LCDinstr
JSR lcd_delay
LDAA #$30 lcd third reset instruction
STAA LCDinstr
JSR lcd_delay
LDAA #$38 LCD init set to 8_bit operation
STAA LCDinstr and select 2-line display
JSR lcd_delay
LDAA #00001100B LCD display on/off
STAA LCDinstr 00001DCB D=displ. C=cursor B=blink
JSR lcd_delay
LDAA #$06 LCD entry point
STAA LCDinstr
JSR lcd_delay
* ---------------------
WRITE_LCD LDX #LCD_TEXT
NEXT_LCD_TEXT LDAA #10000000B cursor home
STAA LCDinstr
JSR lcd_delay
ldab #16
NEXT_LINE1 ldaa X
staa LCD
jsr lcd_delay
inx
decb
bne NEXT_LINE1
LDAA #$C0 second line
STAA LCDinstr
jsr lcd_delay
ldab #16
NEXT_SECOND ldaa X
staa LCD
jsr lcd_delay
inx
decb
bne NEXT_SECOND
cpx #LCD_TEXT+64
blo NEXT_LCD_TEXT
jmp WRITE_LCD
LOOP BRA LOOP
*==============================================
lcd_delay LDY #$3000 Delay
dec_regy DEY
BNE dec_regy
RTS
LCD_TEXT FCC 'SECOND LCD TEXT '
FCC 'PROGR: LCD2.ASS '
LCD_VOID FCC '----------------'
FCC '----------------'