Orgler electronic
Applications with microcontroller 68HC11 and 68HC811

This HC11 Web Ring owned by Orgler electronic
[ Previous 5 Sites | Skip Previous | Previous | Next Skip Next | Next 5 Sites | Random Site | Complete Ring List ]

Applications: schematics and software

Software 68HC11 68HC811:


  1. 68HC11 Schematic in Bootstrap-Mode
  2. 68HC11 Schematic in Expanded Mode
  3. 68HC11 with CAN-BUS
  4. FLASH AMD 29F010 with 68HC11
  5. SPI, External EEPROM 24C65 with 68HC11
  6. OUTPUT COMPARE - INPUT CAPTURE 68HC11
  7. 68HC11 and IEC-BUS
  8. 68HC811 and PWM
  9. ULTRASONIC EXAMPLE
     
  1. ASSEMBLER/DISASSEMBLER 68HC11
  2. 68HC11 Simulator HX11.EXE
  3. HX11 examples
  4. SET CONFIG-REGISTER of 68HC11,68HC811
  5. 68HC11 and TCP/IP
  6. 68HC11, RS232, Interrupts
  7. Programming 68HC11 in 'C' LCD-Initialize
  8. LCD-Initialize in assembler

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

  1. PID-Drivecontrol with 68HC11
  2. STEPPER CONTROL
  3. 68HC11 read encoder
  4. High accuracy RPM-measurement with 68HC11
  5. 68HC11 programms eproms 27C64 to 27C512
Orgler Ludwig click to enlarge
I am working as prof.
at this technical school

68HC11 links

  1. Stephens Techo Links of Interest [ Delphi | Home Control | 68HC11 |Other Links ]
  2. Roger's Embedded Microcontrollers Home Page This page is intended to be a source
    of information for those interested in Motorola MC68HC05, MC68HC11 and...
  3. Motorola Microcontrollers
  4. Motorola University Support Program
  5. Motorola's 68HC11 Page
  6. Motorola Embedded Microcontroller Products
  7. Motorola  Semiconductor Web Site
  8. Sylvain BissonettePage with schematics and sample routines.
  9. link to some free software
  10. page from YVAN BOURNE France
    ANY QUESTION ??     e-mail  orgler@tin.it

    68HC11 Schematic in Bootstrap-Mode
    return to 68HC11 top
    mini1.gif
    A simple schematic for 68HC11 or 68HC811 in Bootstrap-Mode
    MODA and MODB = 0 Volt
    The RS232-circuit has a automatic RESET-circuit
    My assembler ASY.EXE send a BREAK-Signal with 110 Baud
    and this signal charge the condenser C5
    BOOTSTRAP continue ...

    68HC11 Schematic in Expanded-Mode
    return to 68HC11 top
    hc11exp1.gif
    other circuits:decode, eprom ram and LCD

    ASSEMBLER / DISASSEMBLER 68HC11
    return to 68HC11 top
    assem.zip (38.925 Bytes)

    Explode : ASY.EXE fast assembler for 68hc11 with automatic download.
    Usage: ASY.EXE TEST.ASS [ENTER]
    With the extension "ASS" the assembler loads automatically in the
    internal EEPROM (B600-B7FF) of 68HC11

    DISASSEMBLER FOR 68HC11
    dishc11.zip (44.932 Bytes)
    Explode : MAKEASS.EXE and DISASS.EXE
    The programm MAKEASS.EXE convert a BINFILE in a Source-Textfile
    with lines like the follow:
    FCB $86,$01,$B7,$10,$3D,8E,$00,$FF $E000-$E007

    Any assembler convert this Source-Textfile in a Binfile to compare
    with the original BINFILE.

    The disassembler DISASS.EXE opens the original BINFILE and the user
    can see the binary and disassembled code.
    With F8 the user can save a marked block and
    insert in the Source-Textfile created with MAKEASS.EXE.
    Step by step the user can disassembled all the routines of the
    orginal BINFILE.
    The user must decide if the code is a program, a text or a datatable.
    The reassambled code with a compare (FC file compare) is the security.


    68HC11 SIMULATOR
    return to 68HC11 top
    hx11vw2.gif
    hx11.zip with examples (62.9 KBytes)
    The software can load every program in the internal EEPROM
    (68HC11A1 and 68HC11811)
    and execute it step by step.
    The board must be in BOOTSTRAP-MODE


    SET CONFIG-REGISTER of 68HC11,68HC811
    return to 68HC11 top

    SETCONF.ZIP (25.784 Bytes)
    Usage: SETCONF.EXE 09 [ENTER]
    The CONFIG-REGISTER is set to hexvalue 09
    The board with 68HC11 must be in BOOTSTRAP-MODE

    68HC11 with CAN-BUS
    return to 68HC11 top

    can2.gif

    hc11-can.jpg 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

    can3.gif

    can4.gif


    68HC11 and IEC-BUS (application with Loggyboard)
    return to 68HC11 top

    IEC1.GIF


    return to 68HC11 top
    TCP-IP with small MICROCONTROLLER
    8-Bit MICROCONTROLLER sent E-MAILS


    TCP.ZIP (27.751 Bytes) PPP.EXE + SCAN.EXE


    At the moment I´m just working on a project in which I try to
    send an e-mail with a small 8-Bit microcontroller
    ( ex. 68HC11, 80C51).
    It should contain the status of the periphericals in text
    format, like:

    INPUT 1 = OFF
    INPUT 2 = ON
    TEMPERATUR 1 = 23,6 GRAD
    TEMPERATUR 2 = 18,5 GRAD

    To reach this object I following the steps stated below:

    1) I send an e-mail from my PC under Windows.

    2) I connect the second PC between COM2 and the Modem.

    3) I tracked the data stream (PPP, LCP, IP, TCP, UDP )
    with my mailtool (with my own program in 'C++')
    and the second PC and analyzed it.

    4) My program PPP.EXE receives the data on
    COM2 and COM1 and save it in ASCII-HEX-Format

    5) I scan the data with my program SCAN.EXE and filter out
    the various protocols and save them as formatted text.

    6) I use various RFCs as guideline.

    7) I would write the program on micro in assembler with
    a code under 64K, otherwise I use banking.

    MY QUESTION:
    Is there someone else who is working on the same
    problem ???


    ----------------------------------------------------------
    Example: PPP.EXE save data in ASCII-HEX-Format:
    :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~
    
    


    return to 68HC11 top
    ULTRASONIC EXAMPLE
    ultrasch.gif




    return to 68HC11 top
    ****   #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++;
         }
    
    }
    
    

    LCD-Initialize in assembler
    return to 68HC11 top

    Schematic: LCD with 68HC11

    The program is loaded in BOOTSTRAP MODE.
    ***************** 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	'----------------'