Hey guys, nice to meet youI
I am learning assembly code and my teacher recommended me to start with this microcontroller.
The problem is that i was not able to find any solved assignments or exercises, i am a little confused (i am not an expert :/ ).
I want to improve my skills but i need some help, i cannot do it without a guide.
Could you please help me with some information or solved exercises about this microcontroller? I want to understand everything.
I want to be able to write programs using assembly code for this microcontroller.
To be honest, I don't think you've been given good advice. That is a very old processor and there are much better modern ones to work with. Most 16 or 18 series pic chips have everything built (including debugger) in so just the chip alone can be programmed. The above processor requires an external oscillator and, I think, some sort of monitor program. Here's a typical 68 evaluation board.
To be honest, I don't think you've been given good advice. That is a very old processor and there are much better modern ones to work with. Most 16 or 18 series pic chips have everything built (including debugger) in so just the chip alone can be programmed. The above processor requires an external oscillator and, I think, some sort of monitor program. Here's a typical 68 evaluation board.
Yeah, its pretty old but it is good for learning (i guess )
Dude, i want to learn assembly code using this microcontroller. Have you got any good guide about it?I want to see some good solved exercises, thats the best way.. i mean, i found a lot of information but i could not find solved exercises and thats the key
These are some fragments for one of our products that used a 68HC11F1 some years ago.
I can't give you the full file, but a few bits to get you started.
It's an assembler output listing so has the resulting machine code in the first couple of columns, where the source produces that.
First, the internal equates for the device registers, to be able to use those by name:
Code:
*
1000 REGISTER equ $1000 Default register set location
8000 REG equ $8000 Register base after remapping
*
002C comminit equ %00101100 RX int, no TX interrupt, but tx and rx on
*
0000 org 0
*
0000 PORTA rmb 1 I/O port A
0001 DDRA rmb 1 Data Direction for port A
0002 PORTG rmb 1 I/O port G
0003 DDRG rmb 1 Data Direction for port G
0004 PORTB rmb 1 I/O port B
0005 PORTF rmb 1 I/O port F
0006 PORTC rmb 1 I/O port C
0007 DDRC rmb 1 Data direction for port C
0008 PORTD rmb 1 I/O port D
0009 DDRD rmb 1 Data direction for port D
000A PORTE rmb 1 I/O port E
*
000B CFORC rmb 1 Compare force reg.
000C OC1M rmb 1 OC1 Action mask reg.
000D OC1D rmb 1 OC1 Action data reg.
*
000E TCNT rmb 2 Timer counter reg.
0010 TIC1 rmb 2 Input capture 1 reg.
0012 TIC2 rmb 2 Input capture 2 reg.
0014 TIC3 rmb 2 Input capture 3 reg.
0016 TOC1 rmb 2 Output compare 1 reg.
0018 TOC2 rmb 2 Output compare 2 reg.
001A TOC3 rmb 2 Output compare 3 reg.
001C TOC4 rmb 2 Output compare 4 reg.
001E TOC5 rmb 2 Output compare 5 reg.
*
0020 TCTL1 rmb 1 Timer control reg. 1
0021 TCTL2 rmb 1 Timer control reg. 2
0022 TMSK1 rmb 1 Timer interrupt mask reg. 1
0023 TFLG1 rmb 1 Timer int. flags 1
0024 TMSK2 rmb 1 Timer Int. mask reg. 2
0025 TFLG2 rmb 1 Timer int. flags 2
0026 PACTL rmb 1 Pulse acc. control reg.
0027 PACNT rmb 1 Pulse acc. counter
*
0028 SPCR rmb 1 SPI Control reg.
0029 SPSR rmb 1 SPI status reg.
002A SPDR rmb 1 SPI data reg.
*
002B BAUD rmb 1 SCI Baud rate reg.
002C SCCR1 rmb 1 SCI Control reg. 1
002D SCCR2 rmb 1 SCI Control reg. 2
002E SCSR rmb 1 SCI Status reg.
002F SCDR rmb 1 SCI Data register.
*
0030 ADCTL rmb 1 ADC Control reg.
0031 ADR1 rmb 1 A/D Result reg. 1
0032 ADR2 rmb 1 A/D Result reg. 2
0033 ADR3 rmb 1 A/D Result reg. 3
0034 ADR4 rmb 1 A/D Result reg. 4
*
0035 BPROT rmb 1 EEPROM Block Protect Reg.
0036 rmb 1 reserved
0037 rmb 1 reserved
0038 OPT2 rmb 1 System Configurations Options 2 Reg.
*
0039 OPTION rmb 1 System config. options
003A COPRST rmb 1 Arm/Reset COP timer
003B PPROG rmb 1 EEPROM programming control
003C HPRIO rmb 1 Highest prio. int & misc.
003D INIT rmb 1 RAM & I/O mapping reg.
003E TEST1 rmb 1 Factory test control reg.
003F CONFIG rmb 1 COP, ROM & EEPROM enables.
*
0040 rmb $1C reserved
*
005C CSSTRH rmb 1 Chip Select Clock Stretch Reg.
005D CSCTL rmb 1 Chip Select Control Register
005E CSGADR rmb 1 General-Purpose Chip Select Address Reg.
005F CSGSIZ rmb 1 General-Purpose Chip Select Size reg.
*
* End of Register block.
*