Ken, there may be a les expensive solution than adding another chip. Why not dedicate the hardware uart and a software uart for the comm stuph, and use another software uart for comm'ing to the LCD. After all, you're likely only going one way to the serial LCD anyway, no worry about losing characters there. Mark AVR-Chat@yahoogroups.com wrote: To unsubscribe from this group, send an email to: AVR-Chat-unsubscribe@yahoogroups.com ------------------------------------------------------------------------ There are 5 messages in this issue. Topics in this digest: 1. RE: Multiple software uarts.......... From: "Al Welch" 2. RE: Multiple software uarts.......... From: "Al Welch" 3. RE: Multiple software uarts.......... From: David VanHorn 4. RE: Multiple software uarts.......... From: mpdickens 5. ATmega16 fuse settings From: jay marante ________________________________________________________________________ ________________________________________________________________________ Message: 1 Date: Thu, 13 Nov 2003 12:13:00 -0800 From: "Al Welch" Subject: RE: Multiple software uarts.......... Ken I suggest you find a way to add hardware uarts. It can be hard to service uarts and not miss a character. IF the char is important such as part of a command or something then you will not want to drop chars and have a bad message. All you need is some occasional software task that takes longer than one char time and you will drop a char. Trying to do this in software seems like a lot of overhead. UARTS with FIFO buffers are real handy when you have a lot going on and you do not want to miss a char. Another thing is what if the two software uarts are async to each other? You would have to time differently from the start bit of one channel to the start bit of the second channel I would think. Perhaps there may be an SPI or I2C hardware uart out there you could hang on just a few lines of your board? Al Welch -----Original Message----- From: ktucker8825 [mailto:ken_tucker@sbcglobal.net] Sent: Tuesday, November 11, 2003 1:21 PM To: AVR-Chat@yahoogroups.com Subject: [AVR-Chat] Multiple software uarts.......... I am currently working on a project with bascom-avr, atmega16L. i am utiliizing the hardware usart to talk to a serial LCD display. i need 2 additional ports. i can get both software uarts to work, but only one at a time. when i try to implement both software uarts only one will work properly. the other is putting out garbage (as seen on the terminal) my code is only calling one software uart at a time....... i am (at this time) only interested in outputting data on these ports and the output strings will be sent with no handshaking as canned strings ............any ideas TIA Ken Tucker ***** Code Snip Do Call Serial_1() Call Serial_2() Loop Sub Serial_1() 'open portD.4 for output Open "comd.4:9600,8,n,1" For Output As #1 'open portD.5 for input Open "comd.5:9600,8,n,1" For Input As #2 Print #1 , "this is a test output of soft port 1"; 'close ports Close #1 Close #2 End Sub Sub Serial_2() 'open portD.6 for output Open "comd.6:9600,8,n,1" For Output As #3 'open portD.7 for input Open "comd.7:9600,8,n,1" For Input As #4 Print #3 , "this is a test output of soft port 2"; 'close ports Close #3 Close #4 End Sub 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/ ________________________________________________________________________ ________________________________________________________________________ Message: 2 Date: Thu, 13 Nov 2003 12:24:33 -0800 From: "Al Welch" Subject: RE: Multiple software uarts.......... Ken a quick search turned up the Maxim3110 which is dual channel, SPI and has drivers and recvrs built in. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2052 Al Welch -----Original Message----- From: Al Welch [mailto:alwelch@axxiomchromatography.com] Sent: Thursday, November 13, 2003 12:13 PM To: AVR-Chat@yahoogroups.com Subject: RE: [AVR-Chat] Multiple software uarts.......... Ken I suggest you find a way to add hardware uarts. It can be hard to service uarts and not miss a character. IF the char is important such as part of a command or something then you will not want to drop chars and have a bad message. All you need is some occasional software task that takes longer than one char time and you will drop a char. Trying to do this in software seems like a lot of overhead. UARTS with FIFO buffers are real handy when you have a lot going on and you do not want to miss a char. Another thing is what if the two software uarts are async to each other? You would have to time differently from the start bit of one channel to the start bit of the second channel I would think. Perhaps there may be an SPI or I2C hardware uart out there you could hang on just a few lines of your board? Al Welch -----Original Message----- From: ktucker8825 [mailto:ken_tucker@sbcglobal.net] Sent: Tuesday, November 11, 2003 1:21 PM To: AVR-Chat@yahoogroups.com Subject: [AVR-Chat] Multiple software uarts.......... I am currently working on a project with bascom-avr, atmega16L. i am utiliizing the hardware usart to talk to a serial LCD display. i need 2 additional ports. i can get both software uarts to work, but only one at a time. when i try to implement both software uarts only one will work properly. the other is putting out garbage (as seen on the terminal) my code is only calling one software uart at a time....... i am (at this time) only interested in outputting data on these ports and the output strings will be sent with no handshaking as canned strings ............any ideas TIA Ken Tucker ***** Code Snip Do Call Serial_1() Call Serial_2() Loop Sub Serial_1() 'open portD.4 for output Open "comd.4:9600,8,n,1" For Output As #1 'open portD.5 for input Open "comd.5:9600,8,n,1" For Input As #2 Print #1 , "this is a test output of soft port 1"; 'close ports Close #1 Close #2 End Sub Sub Serial_2() 'open portD.6 for output Open "comd.6:9600,8,n,1" For Output As #3 'open portD.7 for input Open "comd.7:9600,8,n,1" For Input As #4 Print #3 , "this is a test output of soft port 2"; 'close ports Close #3 Close #4 End Sub 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/ 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/ ________________________________________________________________________ ________________________________________________________________________ Message: 3 Date: Thu, 13 Nov 2003 15:45:54 -0500 From: David VanHorn Subject: RE: Multiple software uarts.......... At 12:24 PM 11/13/2003 -0800, Al Welch wrote: >Ken a quick search turned up the Maxim3110 which is dual channel, SPI and >has drivers and recvrs built in. > >http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2052 BTDT. You'll be far better off to use a low end AVR with hardware, or software uart, and have THAT act as your uart chip. More Brains, More Buffer, Less Bucks! ________________________________________________________________________ ________________________________________________________________________ Message: 4 Date: Thu, 13 Nov 2003 14:58:38 -0800 (PST) From: mpdickens Subject: RE: Multiple software uarts.......... --- David VanHorn wrote: > You'll be far better off to use a low end AVR with > hardware, or software uart, and have THAT act as > your uart chip. I agree. You can get a really low end avr for less than $2.00 USD. Program it to do the task (Whatever that is...) and then hand the result back to the parent mcu. Best regards Marvin Dickens Alpharetta, Georgia USA ===== Registered Linux User No. 80253 If you use linux, get counted at: http://www.linuxcounter.org __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree ________________________________________________________________________ ________________________________________________________________________ Message: 5 Date: Fri, 14 Nov 2003 00:20:39 -0800 (PST) From: jay marante Subject: ATmega16 fuse settings What fuse/fuses should i check if i use a 7.378MHz crystal for a 8MHz ATmega16? Tnx! -jay __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree ________________________________________________________________________ ________________________________________________________________________ Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ --------------------------------- Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
Message
Re: [AVR-Chat] Digest Number 535
2003-11-14 by Mark Weston
Attachments
- No local attachments were found for this message.