Compare commits
	
		
			1 Commits
		
	
	
		
			24158df261
			...
			shifting-v
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					6cce5209cc | 
@@ -3,3 +3,7 @@ pal-adapter:
 | 
				
			|||||||
	@avra main.asm
 | 
						@avra main.asm
 | 
				
			||||||
	@echo "Writing to ATMEGA1284..."
 | 
						@echo "Writing to ATMEGA1284..."
 | 
				
			||||||
	@minipro -w main.hex -p ATMEGA1284
 | 
						@minipro -w main.hex -p ATMEGA1284
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					fuses:
 | 
				
			||||||
 | 
						@echo "Writing fuses.conf..."
 | 
				
			||||||
 | 
						@minipro -w fuses.conf -c config -p ATMEGA1284
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,12 @@
 | 
				
			|||||||
# Atmega Microcontroller
 | 
					# Atmega Microcontroller
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Auto build & flash
 | 
				
			||||||
 | 
					Use make to build & flash automatically.
 | 
				
			||||||
 | 
					The first time the microcontroller is flashed, is needed to flash fuses:
 | 
				
			||||||
 | 
					`make fuses`
 | 
				
			||||||
 | 
					Then, every time the asm code is changed, it can be built and flashed with:
 | 
				
			||||||
 | 
					`make`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Build ASM code
 | 
					## Build ASM code
 | 
				
			||||||
`avra filename.asm` (generates *filename.hex*)
 | 
					`avra filename.asm` (generates *filename.hex*)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
fuses_lo = 0xAF
 | 
					fuses_lo = 0xEF
 | 
				
			||||||
fuses_hi = 0x99
 | 
					fuses_hi = 0x99
 | 
				
			||||||
fuses_ext = 0xff
 | 
					fuses_ext = 0xff
 | 
				
			||||||
lock_byte = 0xff
 | 
					lock_byte = 0xff
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -45,17 +45,18 @@
 | 
				
			|||||||
.def HIGH_ACCUM = r16 ; an accumulator in high registers to be used outside of interrupts
 | 
					.def HIGH_ACCUM = r16 ; an accumulator in high registers to be used outside of interrupts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
; define constant
 | 
					; define constant
 | 
				
			||||||
.equ VIDEO_PORT_OUT = PORTA		; Used all PORTA, but connected only PA0
 | 
					.equ VIDEO_PORT_OUT = PORTA		; PORTA is connected to a parallel-in serial-out shift register
 | 
				
			||||||
.equ SYNC_PIN = PC0			; Sync pin (pin 22)
 | 
					.equ SYNC_PIN = PC0			; Sync pin (pin 22)
 | 
				
			||||||
.equ DEBUG_PIN = PC1		; DEBUG: Single vertical sync pulse to trigger oscilloscope (pin 23)
 | 
					.equ DEBUG_PIN = PC1		; DEBUG: Single vertical sync pulse to trigger oscilloscope (pin 23)
 | 
				
			||||||
.equ DATA_PORT_IN = PINB
 | 
					.equ SR_LD_PIN = PC2		; LD pin of shift register (active low)
 | 
				
			||||||
.equ CLK_PIN = PD0
 | 
					.equ DATA_PORT_IN = PIND
 | 
				
			||||||
.equ RS_PIN = PD1
 | 
					.equ CLK_PIN = PC3
 | 
				
			||||||
.equ BUSY_PIN = PD2
 | 
					.equ RS_PIN = PC4
 | 
				
			||||||
 | 
					.equ BUSY_PIN = PC5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
; memory
 | 
					; memory
 | 
				
			||||||
.equ FRAMEBUFFER = 0x0100
 | 
					.equ FRAMEBUFFER = 0x0100
 | 
				
			||||||
.equ FRAMEBUFFER_END = 0x3EC0
 | 
					.equ FRAMEBUFFER_END = 0x3D00	; 15kb @ 512x240
 | 
				
			||||||
 | 
					
 | 
				
			||||||
; start vector
 | 
					; start vector
 | 
				
			||||||
.org 0x0000
 | 
					.org 0x0000
 | 
				
			||||||
 
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user