Atmel AVR Microcontroller discussion group.
software uart and ischarwaiting - ktucker8825 - Nov 12 22:05:00 2003
I wanted to make 2 software uarts and ran into a strange situation.
If I open a port and then close it in one sub routine, open a second
port and close it in another subroutine, the program does not work.
If I open both ports in the same subroutine, use them and then close
both ports the program works.
I can program around this. I just thought it was strange.
Also I wanted to use IsCharWaiting for the software ports. The help
says I can use a channel number but it will not compile. I am using a
registered version of bascom 1.11.7.4
Thanx
______________________________
controlSUITE software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] software uart and ischarwaiting - Mike Putnam - Nov 12 23:24:00 2003
From the Bascom AVR Help file for "CLOSE":
Every opened device must be closed using the CLOSE #channel statement. Of course, you must
use the same channel number.
The best place for the CLOSE statement is at the end of your program
-Mike
----- Original Message -----
From: ktucker8825
To: avrclub@avrc...
Sent: Wednesday, November 12, 2003 6:05 PM
Subject: [AVR club] software uart and ischarwaiting
I wanted to make 2 software uarts and ran into a strange situation.
If I open a port and then close it in one sub routine, open a second
port and close it in another subroutine, the program does not work.
If I open both ports in the same subroutine, use them and then close
both ports the program works.
I can program around this. I just thought it was strange.
Also I wanted to use IsCharWaiting for the software ports. The help
says I can use a channel number but it will not compile. I am using a
registered version of bascom 1.11.7.4
Thanx
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
avrclub-unsubscribe@avrc...
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] software uart and ischarwaiting - Joe - Nov 14 18:59:00 2003
I now open the ports at the begining of my program and close them at
the end. In my subroutines I read and write to the ports when I need.
So far it seems to work ok.
Thanx
JoeT
--- In avrclub@avrc..., "Mike Putnam" <circuit@g...> wrote:
> From the Bascom AVR Help file for "CLOSE":
> Every opened device must be closed using the CLOSE #channel
statement. Of course, you must use the same channel number.
>
> The best place for the CLOSE statement is at the end of your program
>
> -Mike
>
> ----- Original Message -----
> From: ktucker8825
> To: avrclub@avrc...
> Sent: Wednesday, November 12, 2003 6:05 PM
> Subject: [AVR club] software uart and ischarwaiting
> I wanted to make 2 software uarts and ran into a strange
situation.
> If I open a port and then close it in one sub routine, open a
second
> port and close it in another subroutine, the program does not
work.
> If I open both ports in the same subroutine, use them and then
close
> both ports the program works.
> I can program around this. I just thought it was strange.
>
> Also I wanted to use IsCharWaiting for the software ports. The
help
> says I can use a channel number but it will not compile. I am
using a
> registered version of bascom 1.11.7.4
>
> Thanx
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
> To unsubscribe from this group, send an email to:
> avrclub-unsubscribe@avrc...
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
> [Non-text portions of this message have been removed]

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )