-; Various functions: init, (RAM) disk, mmc, timer
+; Hardware initialisation, disk, mmc, timer, DRAM test
; You should have received a copy of the GNU General Public License
; along with avrcpm. If not, see <http://www.gnu.org/licenses/>.
;
; You should have received a copy of the GNU General Public License
; along with avrcpm. If not, see <http://www.gnu.org/licenses/>.
;
out SPL,temp ; init stack pointer
ldi temp,high(RAMEND) ; top of memory
out SPH,temp ; init stack pointer
out SPL,temp ; init stack pointer
ldi temp,high(RAMEND) ; top of memory
out SPH,temp ; init stack pointer
- ldi temp,(1<<PUD) ;disable pullups
- outm8 P_PUD,temp
- out PORTD,_255 ;all pins high
+; ldi temp,(1<<PUD) ;disable pullups
+; outm8 P_PUD,temp
+ out PORTD,_255 ;all pins high (enables pullup on input ports)
- out DDRD,_255 ; all outputs
- out DDRB,_255
- out DDRC,_255
- cbi P_RXD-1,RXD ; RXD pin is input
+ out DDRD,_255 ; PD all outputs
+#if I2C_SUPPORT
+ ldi temp,~((1<<SCL)|(1<<SDA))
+ out DDRC,temp
+#endif
+#if DRAM_8BIT
+ ldi temp,~(1<<RXD)
+ out DDRB,temp
+#endif
outm8 OCR1BH,temp2
outm8 OCR1BL,temp
ldi temp,(1<<ICNC1)|(1<<CS10) ;Noise cancel, fall. edge, Normal Mode, clk/1
outm8 OCR1BH,temp2
outm8 OCR1BL,temp
ldi temp,(1<<ICNC1)|(1<<CS10) ;Noise cancel, fall. edge, Normal Mode, clk/1
- .db 13,13,"CPM on an AVR, v"
- db_version VMAJOR, VMINOR
-
+ .db '\r', '\r'
+version_string:
+ makestring "CPM on an AVR, v" VERS_STR " r" SVN_REVSTR TESTSTR
+