Yahoo Groups archive

AVR-Chat

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

Thread

Re: [AVR-Chat] PortC problem

Re: [AVR-Chat] PortC problem

2004-01-11 by Dave VanHorn

At 11:36 AM 1/11/2004 -0500, Dave and Connie wrote:
>My son is trying to use a Mega16 to drive LEDs on PortC using Bascom.  Bits
>0,1,6,7 work but 2,3,4,5 do not.  The port is set up with Config Portc =
>output.  The same code works on PortA but he does not want to use that port
>as it is the A/D converters.  The LED code will eventually become stepper
>code.  He has tried the code on two chips with the same result.

Have you tried replacing the chip?

It's odd that only the end bits are working.
I don't have a M16 sheet handy, but the M128 lists only address for SRAM as 
alternate functions for port c.

Alternatively, maybe the byte being output is being masked or otherwise 
corrupted somewhere?

AVRA driectives

2004-01-11 by Dave VanHorn

Does anyone know if AVRA accepts a directive to echo output to console?

What I'm after is something that will let me log what options are turned on 
or off in a given build, like below in pseudo-code

.equ	Option_1 = True
.equ	Option_2 = False

<much later>

.if Option_1
.comment Option 1 enabled in gronker
.endif

.if  Option_2
.comment Option 2 enabled in lunker
.endif

.if Option_1 & Option_2
.comment This code will not run, Option 1 and Option 2 are not compatible, 
you dope...
(I know I could just leave junk code here to force an errror..)
.endif

Something like that anyway..
Then I can invoke it with avra >> logfile and capture the output for review 
before release.

RE: [AVR-Chat] PortC problem

2004-01-11 by Larry Barello

PC2-5 are the JTAG port.  You need to disable that feature in the fuse
settings (programmer, fuse page) to enable those bits as normal i/o bits.

Cheers!
Show quoted textHide quoted text
-----Original Message-----
From: Dave VanHorn [mailto:dvanhorn@cedar.net]
Sent: Sunday, January 11, 2004 8:44 AM
To: AVR-Chat@yahoogroups.com; AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] PortC problem


At 11:36 AM 1/11/2004 -0500, Dave and Connie wrote:
>My son is trying to use a Mega16 to drive LEDs on PortC using Bascom.  Bits
>0,1,6,7 work but 2,3,4,5 do not.  The port is set up with Config Portc =
>output.  The same code works on PortA but he does not want to use that port
>as it is the A/D converters.  The LED code will eventually become stepper
>code.  He has tried the code on two chips with the same result.

Have you tried replacing the chip?

It's odd that only the end bits are working.
I don't have a M16 sheet handy, but the M128 lists only address for SRAM as
alternate functions for port c.

Alternatively, maybe the byte being output is being masked or otherwise
corrupted somewhere?





Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/AVR-Chat/

To unsubscribe from this group, send an email to:
 AVR-Chat-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/

Re: [AVR-Chat] AVRA driectives

2004-01-12 by John Samperi

At 12:47 PM 11/01/04 -0500, you wrote:
>
>Does anyone know if AVRA accepts a directive to echo output to console?
>

Atmel's assembler v1.74 now does (I think) and since they fixed the stupid
directive form hash back to full stop it is compatible with AVRA again.

Is this what you need? (from the manual)

ERROR - Outputs an error message string

The ERROR directive outputs a string and halts the assembling.  May be used
in conditional assembly.

Syntax: 
.ERROR "<string>" 

Example: 
.IFDEF TOBEDONE
.ERROR "Still stuff to be done.."
.ENDIF


MESSAGE - Output a message string
The MESSAGE directive outputs a string.  Useful in conditional assembly.

Syntax: 
.MESSAGE "<string>" 

Example: 
.IFDEF DEBUG
.MESSAGE "Debug mode"
.ENDIF

 
Rememer that this comes with the official release of Studio
4.08 not the beta version.

Regards

John Samperi

******************************************************
                        Ampertronics Pty. Ltd.
  11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
         Tel. (02) 9674-6495       Fax (02) 9674-8745
               Email: samperi@ampertronics.com.au
                 Website  http://ampertronics.com.au
* Electronic Design   * Technical Services   * Contract Assembly
******************************************************

Re: AVRA driectives

2004-01-12 by Stefan Wimmer

Hello Dave,

here a snippet of one of my source files used with AVRA:

;***** Global Setup

; which CPU to use?
.define TINY12	1
.define Tiny15	0

; which version to produce?
.define	TinyTimer	1
.define	TinyTimerS	0
.define	TinyTimerSL	0

.if Tiny12
.message "assembled for Tiny12"
.include "tn12def.inc"
.endif

.if Tiny15
.message "assembled for Tiny15"
.include "tn15def.inc"
.endif

Re: [AVR-Chat] Re: AVRA driectives

2004-01-12 by David VanHorn

>
>.if Tiny12
>.message "assembled for Tiny12"
>.include "tn12def.inc"
>.endif

That's what I was looking for..
However, one more layer of mystery.
When I invoke AVRA with "avra project.asm >> logfile.txt" I get all the AVRA output, but none of the messages.  The messages show up on the console though.

So close..

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.