Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

comms problem

2008-04-05 by Brian

I made a program in asm that kinda works. the only problem is when my 
mega16 xmits to hyperterminal I get weird symbols. I am working with 
4Mhz 4800 baud. the letters in sram are in hex format. But the 
symbols in HT look like they are from the extended ascII table. My 
baud rate is set at 0x51. Has anyone else have a simliar problem?

Brian


..........
main:
	ldi	ZH,high(message*2)	; Load high part of byte 
address into ZH
	ldi	ZL,low(message*2)	; Load low part of byte 
address into ZL
	clr	r0					;

menu:
	lpm						; Load byte 
from program memory into r0
	nop						;
	nop						;
	tst	r0					; Check if I 
reached the end of the message
	breq	run				; If so, continue
	mov treg, r0			;xmit message
	rcall txcomp			;
	adiw	ZL,1			; Increase Z registers
	rcall menu				;
.........
message:
	.db     $50,$72		; P ,r
	.db     $65,$73         ; e ,s
	.db     $73,$20         ; s ,SP
	.db     $61,$6E         ; a ,n 
	.db     $79,$20         ; y ,SP
	.db     $6B,$65         ; k ,e 
	.db     $79,$20         ; y ,SP
	.db     $74,$6F         ; t ,o 
	.db     $20,$63         ; SP,c
	.db     $6F,$6E         ; o ,n
	.db     $74,$69         ; t ,i 
	.db     $6E,$75         ; n ,u
	.db     $65,$0A         ; e ,LF
	.db     $0A,$0D         ; LF,CR
	.db     $00,$00         ; END

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.