[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Problem with source
From: |
Larry Barello |
Subject: |
Re: [avr-gcc-list] Problem with source |
Date: |
Sat, 3 Mar 2001 14:32:55 -0800 |
You can't read the pins by simple assignment. All you are
doing is printing out the address of PINC!
Try:
outdat = inp(PINC); // Check iomacros.h to verify the
syntax..
----- Original Message -----
From: "Karsten Becker" <address@hidden>
> Hi,
> I'm new to avr-gcc and i'm just playing around a bit with
the gcctests.
> I tried following source:
> #include "uart.h"
> #include <progmem.h>
> #include <io8515.h>
>
> int main(void)
> {
> u08 outdat;
> /* Initialise UART */
> UART_Init();
> for (;;) { /* loop forever */
> outdat=PINC;
> PRINT("The number is:");
> UART_Printfu08(outdat);
> EOL();
> }
> }
>
> But the only output I get is the number is 13 without
pushing any
> buttons?
> Whats wrong with this source?