Re: [AVR-Chat] Digest Number 577
2004-01-05 by Mark Weston
Mega8 is a slim-28pin package so two 14pin sockets would work???! Wow, my bad. Mark AVR-Chat@yahoogroups.com wrote: There are 25 messages in this issue. Topics in this digest: 1. Re: Digest Number 575
Show quoted textHide quoted text
From: "Wagner Lipnharski" 2. Re: Hi from Hospital From: John Samperi 3. Re: Digest Number 575 From: John Samperi 4. STK500 Default Demo Rewrite!!! From: "Steven Chang-Lin Yu" 5. DTMF From: "Salam" 6. Re: DTMF From: "Rogier Schouten" 7. Sim problems, AGAIN. From: David VanHorn 8. Re: Sim problems, AGAIN. From: "Rogier Schouten" 9. Re: Sim problems, AGAIN. From: "Wagner Lipnharski" 10. Re: Sim problems, AGAIN. From: David VanHorn 11. More fun with Studio From: David VanHorn 12. Re: Digest Number 575 From: "Stefan Wimmer" 13. Re: Sim problems, AGAIN. From: David VanHorn 14. RE: Sim problems, AGAIN. From: "Larry Barello" 15. RE: Sim problems, AGAIN. From: David VanHorn 16. RE: Sim problems, AGAIN. From: "Larry Barello" 17. Re: Sim problems, AGAIN. From: "Wagner Lipnharski" 18. Re: Sim problems, AGAIN. From: David VanHorn 19. RE: Sim problems, AGAIN. From: David VanHorn 20. RE: Sim problems, AGAIN. From: "Larry Barello" 21. RE: Sim problems, AGAIN. From: David VanHorn 22. RE: Sim problems, AGAIN. From: "Larry Barello" 23. RE: Sim problems, AGAIN. From: David VanHorn 24. A/D and audio questions. From: "c45a6" 25. Re: A/D and audio questions. From: David VanHorn ________________________________________________________________________ ________________________________________________________________________ Message: 1 Date: Thu, 1 Jan 2004 21:58:09 -0500 From: "Wagner Lipnharski" Subject: Re: Digest Number 575 Digikey ED3128-ND will do the job. Or just buy a 28 pins dip 600mils, serrate in the middle (wire clipper will do it), make it 300mils wide. David VanHorn wrote: > At 04:15 PM 1/1/2004 -0800, Mark Weston wrote: > >> Brian: >> >> A 28 pin chip is much wider than a fourteen pin chip, so unless you >> want to split the socket and spread them out, two 14pin sockets will >> not equal one 28pin socket. > > But the M8 dip is a 28 narrow, and this does work. ________________________________________________________________________ ________________________________________________________________________ Message: 2 Date: Fri, 02 Jan 2004 13:53:08 +1100 From: John Samperi Subject: Re: Hi from Hospital At 12:46 PM 1/01/04 -0000, you wrote: >Back in hospital, have a UTI from the Cathater :o( so I am in for a >while, I have a net connection (thanks to my ISP and a phone in my >room ;o) > >Hope you all had a good new years eve, I spent it in ER :o( So I guess you will take this as an excuse for not answering my call for all ICE200 users a few days ago :-) Of course you don't get cat-scan but Kat-scans. Get well soon and try not to make it a habit to spend time in hospital with all the problems with our hospitals in Australia. 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 ****************************************************** ________________________________________________________________________ ________________________________________________________________________ Message: 3 Date: Fri, 02 Jan 2004 13:48:27 +1100 From: John Samperi Subject: Re: Digest Number 575 At 04:15 PM 1/01/04 -0800, you wrote: > Brian: A 28 pin chip is much wider than a fourteen pin chip, so unless >you want to split the socket and spread them out, two 14pin sockets will >not equal one 28pin socket. Mark > Mark, that's what I thought when I started working with the Mega8, in fact I had the artwork all ready to print as I had other PCB's going for prototyping. Just as well I got 2 chips the day before, then I read the specs for the Mega8 again and I realised that they use a skinny (0.3") 28 pin package so 2*14 pin sockets would work. 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 ****************************************************** ________________________________________________________________________ ________________________________________________________________________ Message: 4 Date: Fri, 2 Jan 2004 21:34:53 +1000 From: "Steven Chang-Lin Yu" Subject: STK500 Default Demo Rewrite!!! I am having some problem writing the default demo that came with the STK500 kits, which is the LED demo using all switch with shift led, inverse, and some other!!! Right now I can detect pin detect, but something is not write, for example for switch 1, the led increase 1 with one place, by using the led++ doesn�t seems to be doing what it should be doing, it give me some rubbish!!! I have included the latest code I still trying to work with!!! If anyone know my problem or have rewritten the LED demo them self, please email me, it will be a great help!!! --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.557 / Virus Database: 349 - Release Date: 30/12/2003 [This message contained attachments] ________________________________________________________________________ ________________________________________________________________________ Message: 5 Date: Fri, 02 Jan 2004 12:00:38 -0000 From: "Salam" Subject: DTMF How can an AVR encode and decode DTMF tones ?? ________________________________________________________________________ ________________________________________________________________________ Message: 6 Date: Fri, 2 Jan 2004 15:40:44 +0100 From: "Rogier Schouten" Subject: Re: DTMF Hi, Take a chip for that purpose. I believe MITEL makes them. MT8870D is a DTMF decoder, and they have encoders as well. Rogier ----- Original Message ----- From: Salam To: AVR-Chat@yahoogroups.com Sent: Friday, January 02, 2004 1:00 PM Subject: [AVR-Chat] DTMF How can an AVR encode and decode DTMF tones ?? Yahoo! Groups Sponsor ADVERTISEMENT ------------------------------------------------------------------------------ Yahoo! Groups Links a.. To visit your group on the web, go to: http://groups.yahoo.com/group/AVR-Chat/ b.. To unsubscribe from this group, send an email to: AVR-Chat-unsubscribe@yahoogroups.com c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [This message contained attachments] ________________________________________________________________________ ________________________________________________________________________ Message: 7 Date: Fri, 02 Jan 2004 11:37:56 -0500 From: David VanHorn Subject: Sim problems, AGAIN. ATMEGA8 simulation in: AVR Studio 4, 8, 0, 310 Platform AVR Simulator Build 1, 0, 0, 12 Part ATMEGA8 Build 65 Operating System Major 5 Minor 1 PlatformID 2 Build 2600 Service Pack 1 Problem #1: Everything's fine initting the machine, up to Idle. I set a BP at Idle, and run it to there. Then I put a BP in at Panic, and take off the one at Idle. Notice that all the routines are commented out. So only ISR's could even be running. After 6513uS (the loop takes 1uS) I'm at Panic, with SP at 045F Apparently it loops in this code 6512 times just fine, then fails the same test. Now, the question is, with SPL=5F, and SPH=04, WHY am I at Panic? With the routines enabled, I run the machine just fine, till I hit Panic. Idle: ;rcall Timed_Smack ;Resets watchdog, if it's time to do so. wdr ;rcall Start_Step ;If possible, make a step, speed based on fu ;rcall Printhead_Latch ;Latches printhead, and starts burning the A half ;rcall Send_Pixel_Line ; ;rcall Fake_Pixel_Lines; Simulates reception via SPI, except a line at a time. ;Stack check in TEMP,SPL cpi TEMP,$5F brne PANIC in TEMP,SPH cpi TEMP,$04 breq Idle Panic: rjmp Panic Problem #2: I am getting INT1 even though INT1 is disabled. It does appear to respect GIE, but at more or less random intervals, I find myself in the INT1 ISR, with INT1 cleared in GICR. INT0 does not seem to have this problem. ________________________________________________________________________ ________________________________________________________________________ Message: 8 Date: Fri, 2 Jan 2004 18:28:06 +0100 From: "Rogier Schouten" Subject: Re: Sim problems, AGAIN. Hi, Did you initialize the stack pointer? Is there anything fancy using push/pop/SP in your ISRs? Rogier ----- Original Message ----- From: David VanHorn To: g Bankston ; avrbeta@atmel.com ; AVR-Chat@yahoogroups.com Sent: Friday, January 02, 2004 5:37 PM Subject: [AVR-Chat] Sim problems, AGAIN. ATMEGA8 simulation in: AVR Studio 4, 8, 0, 310 Platform AVR Simulator Build 1, 0, 0, 12 Part ATMEGA8 Build 65 Operating System Major 5 Minor 1 PlatformID 2 Build 2600 Service Pack 1 Problem #1: Everything's fine initting the machine, up to Idle. I set a BP at Idle, and run it to there. Then I put a BP in at Panic, and take off the one at Idle. Notice that all the routines are commented out. So only ISR's could even be running. After 6513uS (the loop takes 1uS) I'm at Panic, with SP at 045F Apparently it loops in this code 6512 times just fine, then fails the same test. Now, the question is, with SPL=5F, and SPH=04, WHY am I at Panic? With the routines enabled, I run the machine just fine, till I hit Panic. Idle: ;rcall Timed_Smack ;Resets watchdog, if it's time to do so. wdr ;rcall Start_Step ;If possible, make a step, speed based on fu ;rcall Printhead_Latch ;Latches printhead, and starts burning the A half ;rcall Send_Pixel_Line ; ;rcall Fake_Pixel_Lines; Simulates reception via SPI, except a line at a time. ;Stack check in TEMP,SPL cpi TEMP,$5F brne PANIC in TEMP,SPH cpi TEMP,$04 breq Idle Panic: rjmp Panic Problem #2: I am getting INT1 even though INT1 is disabled. It does appear to respect GIE, but at more or less random intervals, I find myself in the INT1 ISR, with INT1 cleared in GICR. INT0 does not seem to have this problem. ------------------------------------------------------------------------------ Yahoo! Groups Links a.. To visit your group on the web, go to: http://groups.yahoo.com/group/AVR-Chat/ b.. To unsubscribe from this group, send an email to: AVR-Chat-unsubscribe@yahoogroups.com c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [This message contained attachments] ________________________________________________________________________ ________________________________________________________________________ Message: 9 Date: Fri, 2 Jan 2004 12:33:39 -0500 From: "Wagner Lipnharski" Subject: Re: Sim problems, AGAIN. David VanHorn wrote: > ATMEGA8 simulation in: > AVR Studio 4, 8, 0, 310 > Platform AVR Simulator Build 1, 0, 0, 12 > Part ATMEGA8 Build 65 > > Operating System > Major 5 > Minor 1 > PlatformID 2 > Build 2600 > Service Pack 1 > > Problem #1: > > Everything's fine initting the machine, up to Idle. > I set a BP at Idle, and run it to there. > Then I put a BP in at Panic, and take off the one at Idle. > Notice that all the routines are commented out. > So only ISR's could even be running. > After 6513uS (the loop takes 1uS) I'm at Panic, with SP at 045F > Apparently it loops in this code 6512 times just fine, then fails the > same test. > Now, the question is, with SPL=5F, and SPH=04, WHY am I at Panic? > > With the routines enabled, I run the machine just fine, till I hit > Panic. > > Idle: > ;rcall Timed_Smack ;Resets watchdog, if it's time to do so. > wdr > ;rcall Start_Step ;If possible, make a step, speed based on fu > ;rcall Printhead_Latch ;Latches printhead, and starts burning the A > half ;rcall Send_Pixel_Line ; > ;rcall Fake_Pixel_Lines; Simulates reception via SPI, except a line > at a time. > > ;Stack check > in TEMP,SPL > cpi TEMP,$5F > brne PANIC > in TEMP,SPH > cpi TEMP,$04 > breq Idle > > Panic: > rjmp Panic Are you sure SP is at 045F when at Panic? Is the error happening always at 6513 loop count? Include an extra instruction in the Stack_Check just to force the simulation software to use different size of memory, etc, and see if the problem happens again at 6513 count. ;Stack check IN Temp,SPL IN Temp,SPL ; CPI Temp,$5F BRNE Panic IN Temp,SPH CPI Temp,$04 BREQ Idle > Problem #2: > > I am getting INT1 even though INT1 is disabled. > It does appear to respect GIE, but at more or less random intervals, > I find myself in the INT1 ISR, with INT1 cleared in GICR. > > INT0 does not seem to have this problem. [This message contained attachments] ________________________________________________________________________ ________________________________________________________________________ Message: 10 Date: Fri, 02 Jan 2004 13:31:54 -0500 From: David VanHorn Subject: Re: Sim problems, AGAIN. > >Are you sure SP is at 045F when at Panic? >Is the error happening always at 6513 loop count? That's what it says there on the left in "Stack Pointer" 0X45F when I'm sitting at the PANIC breakpoint.. >Include an extra instruction in the Stack_Check just to force the simulation software to use different size of memory, etc, and see if the problem happens again at 6513 count. I'll try this later, for now I've just rem'd out the panic check. I have other fish to fry.. Still bugged by the INT1 though.. I hate it when a disabled int fires, even more so in SIM where there's no hardware to trigger it.... ________________________________________________________________________ ________________________________________________________________________ Message: 11 Date: Fri, 02 Jan 2004 14:51:33 -0500 From: David VanHorn Subject: More fun with Studio Ok, now I'm looking at warning messages.. I get a few, all complaining about .db segs with odd lengths. So, I go look at the indicated line.. How can COMMENTS and assembler directives generate this warning? The warnings all point to the lines below, inbetween the star bars. ALL of the lines inbetween the star bars, produce the same warnings. The first error is on the line with a single ";" ;*************************************************************************** ; .dseg .org 0x100 .cseg .org 0 .include "m8def.inc" ;Pin and port definitions .include "isr.asm" ;Int vectors, and handlers This file must be first code .include "init.asm" ;Chip initialization, and calls to device inits .include "eeprom.asm" ;For the odometer .include "head.asm" ;Printhead operations .include "stepper.asm" ;Stepper operations .include "therm.asm" ;Adjust burn pulse widths according to temp. .include "tables.asm" ;May not be needed .include "watchdog.asm" ; ;*************************************************************************** Apparently it's not pointing me at the right place for the errors, or it's imagining things.. ________________________________________________________________________ ________________________________________________________________________ Message: 12 Date: Fri, 02 Jan 2004 20:39:08 -0000 From: "Stefan Wimmer" Subject: Re: Digest Number 575 Oops! Please do NOT quote whole digests! his is very annoying for all others who receives messages in digest form. Please quote only as much relevant text as is needed to follow a thread's subject. Stefan --- In AVR-Chat@yahoogroups.com, Mark Weston wrote: > Brian: > > A 28 pin chip is much wider than a fourteen pin chip, so unless you want to split the socket and spread them out, two 14pin sockets will not equal one 28pin socket. > > Mark > > > AVR-Chat@yahoogroups.com wrote: > There are 13 messages in this issue. > > Topics in this digest: ..... ________________________________________________________________________ ________________________________________________________________________ Message: 13 Date: Fri, 02 Jan 2004 16:03:55 -0500 From: David VanHorn Subject: Re: Sim problems, AGAIN. > >Include an extra instruction in the Stack_Check just to force the simulation software to use different size of memory, etc, and see if the problem happens again at 6513 count. Even more fun, I put an extra NOP in the main loop, with the main routines enabled. What would you guess? I start the clock at reset, and let it run till I hit panic. Without the NOP, 55074 uS every time. With the NOP, 34594uS every time. Two nops, 38609, every time. I'm not seeing a pattern here. ________________________________________________________________________ ________________________________________________________________________ Message: 14 Date: Fri, 2 Jan 2004 13:31:20 -0800 From: "Larry Barello" Subject: RE: Sim problems, AGAIN. Since you know exactly when it trips, set up the simulator to break a couple hundred cycles prior to the fault and single step your way to bliss. Eventually you will see the error. -----Original Message----- From: David VanHorn [mailto:dvanhorn@cedar.net] > >Include an extra instruction in the Stack_Check just to force the simulation software to use different size of memory, etc, and see if the problem happens again at 6513 count. Even more fun, I put an extra NOP in the main loop, with the main routines enabled. What would you guess? I start the clock at reset, and let it run till I hit panic. Without the NOP, 55074 uS every time. With the NOP, 34594uS every time. Two nops, 38609, every time. I'm not seeing a pattern here. ________________________________________________________________________ ________________________________________________________________________ Message: 15 Date: Fri, 02 Jan 2004 17:35:03 -0500 From: David VanHorn Subject: RE: Sim problems, AGAIN. At 01:31 PM 1/2/2004 -0800, Larry Barello wrote: >Since you know exactly when it trips, set up the simulator to break a couple >hundred cycles prior to the fault and single step your way to bliss. >Eventually you will see the error. === message truncated === --------------------------------- Do you Yahoo!? Find out what made the Top Yahoo! Searches of 2003