avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] for loop problem


From: Adrian Cottle
Subject: [avr-gcc-list] for loop problem
Date: Fri, 17 Jan 2003 11:49:48 -0000

Hi
Thanks for everyone help on the reset problem yesterday. the watchdog timer 
solution worked great.
I have another problem, not sure if its a problem with me or the conpliler.

I have the function below (well part of it) and it waits in a loop until 
the UART flag is flagged.  If i put a 100ms delay in or do something like 
send a byte to the uart it works fine, but as soon as i leave a empty for 
loop it crashed and needs resettting.
I've tryed putting just a ; in the loop and also a very small loop just 
using up a couple of clock cycles but this doesnt work either.
Its a 8515 running at 8MHz

many thanks

Adrian


int Pulse_Handler(void)
{
int i;
uart_send_byte(33);
  while(UART_Flag == 0)
  {
        msdelay(1);
 //uart_send_byte(46);
  }
  UART_Flag = 0 ;                               
  uart_send_byte(85);  


This message is confidential and intended solely for the use of the 
individual or entity to whom it is addressed. If you are not the intended 
recipient, please contact us, delete the message from your computer and destroy 
any copies. Any review, distribution, copying, other use of, or the taking of 
any action in reliance upon its contents without our prior permission is 
prohibited.
Internet communications are not always secure and therefore Horstmann 
Controls Limited does not accept legal responsibility for this message. 
 The recipient is responsible for verifying its authenticity before acting on 
the contents.  Any attachment may contain software viruses, we cannot accept 
liability for any damage which you sustain as a result of software viruses.  
You should carry out your own virus checks before opening any attachment.  Any 
views or opinions presented are solely those of the author and do not 
necessarily represent those of Horstmann Controls Limited.
Horstmann Controls Limited
South Bristol Business Park
Roman Farm Road
Bristol, BS4 1UP
Tel     :       +44 (0) 117 978 8700
Fax     :       +44 (0) 117 978 8701
Web     :       www.horstmann.co.uk
____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. 

avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]