2009-03-13 by Ardian sandy
please help me how to interface ATMega8535 to RTC(DS1307) and Humidity sensor (SHT11) and SD/MM 1Gb and LCD 20x2 and USART to hyperterminal,,, plese give my code and schematic i am use codevision v 1.24 tanks your attention and solution master.... Ardian 3oz^ ____________________
Thread view
Attachments: 0
2009-03-12 by John Samperi
At 11:27 PM 12/03/2009, you wrote: >Interestingly, the code >just walks right off the end if you get past the >RET in 650, it does a >few things, then wanders off into space. It could seem to just continue instead of "returning" as the "terminator" may have just rearranged the co
Thread view
Attachments: 0
2009-03-12 by John Samperi
At 06:24 PM 11/03/2009, you wrote: >on the eseg table but just xff. You need to download the data into the EEPROM with upload/download memory from Debug before you can see it. Regards John Samperi ******************************************************** Ampertronics Pty. Ltd. 11
Thread view
Attachments: 0
2009-03-12 by BobGardner@aol.com
Want me to compile it on the imagecraft compiler so you have a 2nd listing to look at? -----Original Message----- From: David VanHorn To: AVR-Chat@yahoogroups.com Sent: Wed, 11 Mar 2009 10:28 am Subject: [AVR-Chat] GCC on M32, WIERD happenings. I've asked about this over on the A
Thread view
Attachments: 0
2009-03-11 by David VanHorn
I've asked about this over on the AVR-GCC list, but I thought it wouldn't hurt to ask here too. What's happening is that the compiled code isn't producing sane ASM. This happens intermittently, and I haven't been able to pin down what the dependency is. It appears that if I chang
Thread view
Attachments: 0
2009-03-11 by Guido Helmstetter
Hi This is my first message. I am going through the tutorial from microcontroler.net. It is very good until the thing with the eeprom. I am not downloading to the tiny45 yet. just observing in studio4.16. When setting read of eeprom with sbi eecr, eere. eedr displays instantly al
Thread view
Attachments: 0
2009-03-11 by Bob Paddock
On Mon, Mar 9, 2009 at 4:59 PM, David VanHorn wrote: > The normal equation for setting the UBRR isn't working for me. http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_wrong_baud_rate was just added in 1.6.5 of AVR-LibC. -- http://www.wearablesmartsensors.com/ http://www.so
Thread view
Attachments: 0
2009-03-10 by David VanHorn
> Sorry, I thought it has one like the ATMega48. > > What is your exact baud rate using a 4MHz clock? I'll check it again in the morning, but I was getting good data with the PC set to 115200, and the equation as quoted, with *2 instead of *16
Thread view
Attachments: 0
2009-03-10 by Enki
David VanHorn wrote: >> Does the clock prescaler is correctly programmed? >> > > Prescaler? > > I only see UBRRH and UBRRL. > Is there a prescaler between the UART and the Xtal in a M32? > > Sorry, I thought it has one like the ATMega48. What is your exact baud rate using a 4MHz
Thread view
Attachments: 0
2009-03-10 by David VanHorn
On Mon, Mar 9, 2009 at 8:46 PM, John Samperi wrote: > At 11:06 AM 10/03/2009, you wrote: >>It's generated by Studio.. > > And since when you trust Studio? LOL But I'm working in C now, where everything is perfect and serene, the code is completely portable, and every bit as small
Thread view
Attachments: 0
2009-03-10 by David VanHorn
> Does the clock prescaler is correctly programmed? Prescaler? I only see UBRRH and UBRRL. Is there a prescaler between the UART and the Xtal in a M32?
Thread view
Attachments: 0
2009-03-10 by John Samperi
At 11:06 AM 10/03/2009, you wrote: >It's generated by Studio.. And since when you trust Studio? LOL Regards John Samperi ******************************************************** Ampertronics Pty. Ltd. 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA Tel. (02) 9674-6495 Fax
Thread view
Attachments: 0
2009-03-10 by Enki
David VanHorn wrote: > On Mon, Mar 9, 2009 at 5:38 PM, John Samperi > wrote: > >> At 07:59 AM 10/03/2009, you wrote: >> >>> #define UBRRVAL (((F_CPU/(USART_BAUDRATE*4UL)))) // using the double baud flag >>> >>> May want to try *8UL instead of *4UL for double speed. (usually *16)
Thread view
Attachments: 0
2009-03-10 by David VanHorn
On Mon, Mar 9, 2009 at 7:19 PM, John Samperi wrote: > At 09:05 AM 10/03/2009, you wrote: >>The problem is that the equation I quoted IS giving me the right baud. >>I don't know why.. > > You always get the gremlins, may have to move country!! :) I have the atmel guy coming in wit
Thread view
Attachments: 0
2009-03-09 by John Samperi
At 09:05 AM 10/03/2009, you wrote: >The problem is that the equation I quoted IS giving me the right baud. >I don't know why.. You always get the gremlins, may have to move country!! Have a look at the uart.c file in the example folder (C:\WinAVR-20081205\doc\avr-libc\examples\st
Thread view
Attachments: 0
2009-03-09 by David VanHorn
On Mon, Mar 9, 2009 at 5:38 PM, John Samperi wrote: > At 07:59 AM 10/03/2009, you wrote: >>#define UBRRVAL (((F_CPU/(USART_BAUDRATE*4UL)))) // using the double baud flag > >>May want to try *8UL instead of *4UL for double speed. (usually *16) > > I know you would NEVER have overl
Thread view
Attachments: 0
2009-03-09 by John Samperi
At 07:59 AM 10/03/2009, you wrote: >#define UBRRVAL (((F_CPU/(USART_BAUDRATE*4UL)))) // using the double baud flag >May want to try *8UL instead of *4UL for double speed. (usually *16) I know you would NEVER have overlooked that in ASM. ;-) Regards John Samperi ******************
Thread view
Attachments: 0
2009-03-09 by John Samperi
At 04:11 AM 10/03/2009, you wrote: >which makes it confusing to to reverse engineer. Oh, that must be the reason why I never needed one then. :-) I don't steal someone else's IP. It must be a popular tool in China or even India then, lots of sales there...unless of course they "r
Thread view
Attachments: 0
2009-03-09 by David VanHorn
I just noticed something in the Jtag ice MKii manual about an IDR register... "Enable I/O Debug Register" What's this, and what devices is it on? -- "The very powerful and the very stupid have one thing in common. Instead of altering their views to fit the facts, they alter the f
Thread view
Attachments: 0
2009-03-09 by David VanHorn
The normal equation for setting the UBRR isn't working for me. This is an ATMEGA32, with 4 MHz external crystal. I verified that the CPU is running at 4 MHz, full output mode. #ifndef F_CPU # warning "F_CPU not defined MagSensor.c" # define F_CPU 4000000 #endif #define USART_BAUD
Thread view
Attachments: 0
2009-03-09 by Raymond Hurst
AVR Studio does do a one pass disassembly. Then you have to continuously work it with a text editor. Also it doesn't recognize register names, memory space and ISR vectors. If the code has a lot of data embedded in it then AVR Studio will try to disassemble it into code which mak
Thread view
Attachments: 0
2009-03-09 by David Kelly
On Mon, Mar 09, 2009 at 05:11:39AM -0700, David Appleton wrote: > I think this'd be a good tool to have! > > > John, > > Does AVR Studio really disassemble, hex to C ?! > > Will it work for GCC? > > I'd love to have that ability. You already have avr-objdump which does a good (if
Thread view
Attachments: 0
2009-03-09 by Zack Widup
AFAIK the AVR disassembler only disassembles into assembly language. That's why it's called a "disassembler" not a "discompiler". :-) But I've used it several times and it does work. Zack On 3/9/09, David Appleton wrote: > > I think this'd be a good tool to have! > > John, > > Do
Thread view
Attachments: 0
2009-03-09 by David Appleton
I think this'd be a good tool to have! John, Does AVR Studio really disassemble, hex to C ?! Will it work for GCC? I'd love to have that ability. Does anyone know if it disassembles reliably? [Non-text portions of this message have been removed]
Thread view
Attachments: 0
2009-03-09 by John Samperi
At 01:54 PM 9/03/2009, you wrote: >The program is a plug-in for the Eclipse IDE and can be sold as an >individual component Don't want to be a killjoy but I'm wondering why such a program is necessary, especially when it looks like one has to pay for it. I never needed to use a d
Thread view
Attachments: 0
2009-03-09 by Raymond Hurst
Visual Disassembler for the Atmel © AVR is an interactive multi-pass disassembler for the AVR microprocessor family. The user simply opens an Intel hex file and the file is disassembled and placed in a text view. The user does not edit the text directly. Comments and program labe
Thread view
Attachments: 0
2009-03-09 by Ray Hurst
Visual Disassembler for the Atmel © AVR is an interactive multi-pass disassembler for the AVR microprocessor family. The user simply opens an Intel hex file and the file is disassembled and placed in a text view. The user does not edit the text directly. Comments and program labe
Thread view
Attachments: 0
2009-03-06 by subscriptions@aeolusdevelopment.com
David Kelly Wrote >On Fri, Mar 06, 2009 at 10:57:03AM -0500, subscriptions@aeolusdevelopment.com wrote: >> >> void put_bytes( unsigned char * const buf, int num) >> { >> int i; >> >> for( i=0; i > serial_out( *buf); >> buf++; >> } >> } > >Benchmark that against the same using ind
Thread view
Attachments: 0
2009-03-06 by David VanHorn
On Fri, Mar 6, 2009 at 11:35 AM, Raymond Hurst wrote: > You need to do something similar to this: That's what I ended up with. Even more fun, because I dispensed entirely with the output buffer, and stuffed it into the T0 interrupt with almost everything else. Processing the arra
Thread view
Attachments: 0
2009-03-06 by Raymond Hurst
Ooops...this won't work..it needs to be this long test[10] = {....}; UDR = (char)( test[i] & 0xFF); UDR = (char)((test[i] >> 8) & 0xFF); UDR = (char)((test[i] >> 16) & 0xFF;) UDR = (char)((test[i] >> 24) & 0xFF); i += 1; Ray
Thread view
Attachments: 0
2009-03-06 by Raymond Hurst
You need to do something similar to this: long test[10] = {....}; UDR = ((char)test[i]) & 0xFF; UDR = ((char)test[i] >> 8) & 0xFF; UDR = ((char)test[i] >> 16) & 0xFF; UDR = ((char)test[i] >> 24) & 0xFF; i += 1; David VanHorn wrote: > > > I am a bit puzzled. (and new to working in
Thread view
Attachments: 0
2009-03-06 by David Kelly
On Fri, Mar 06, 2009 at 10:57:03AM -0500, subscriptions@aeolusdevelopment.com wrote: > > Assuming you are sending the long out as binary, something like the > following is what I would use (serial_out is left out, I'm assuming > the HW control you have a handle on) > > void put_b
Thread view
Attachments: 0
2009-03-06 by subscriptions@aeolusdevelopment.com
David VanHorn Wrote >I have an array of longs that I need to feed out my Uart. >Obviously the uart can't take more than a char. > >The code below shows some of the ideas I've tried, but in all cases, >the ASM shows me that the pointer will be bumped four bytes, not one. > >What's
Thread view
Attachments: 0
2009-03-06 by David Kelly
On Fri, Mar 06, 2009 at 09:41:30AM -0500, David VanHorn wrote: > I am a bit puzzled. (and new to working in C) > > I have an array of longs that I need to feed out my Uart. > Obviously the uart can't take more than a char. > > The code below shows some of the ideas I've tried, bu
Thread view
Attachments: 0
2009-03-06 by David VanHorn
On Fri, Mar 6, 2009 at 9:55 AM, Graham Davies wrote: > --- In AVR-Chat@yahoogroups.com, David VanHorn wrote: > >> I have an array of longs that >> I need to feed out my Uart ... > > David, in the statement: > UDR = &(Proc_Data[Proc_Data_Out_Index])+i; > on the right hand side you
Thread view
Attachments: 0
2009-03-06 by David VanHorn
I am a bit puzzled. (and new to working in C) I have an array of longs that I need to feed out my Uart. Obviously the uart can't take more than a char. The code below shows some of the ideas I've tried, but in all cases, the ASM shows me that the pointer will be bumped four bytes
Thread view
Attachments: 0
2009-03-06 by Graham Davies
--- In AVR-Chat@yahoogroups.com, David VanHorn wrote: > I have an array of longs that > I need to feed out my Uart ... David, in the statement: UDR = &(Proc_Data[Proc_Data_Out_Index])+i; on the right hand side you take the address of an array element and add i. What is puzzling y
Thread view
Attachments: 0
2009-03-04 by David Collier
Is there a public statement on the future of the AP7200? D
Thread view
Attachments: 0
2009-03-03 by Roy E. Burrage
Since there has been much discussion about crystals and oscillators of late, this article might be interesting to some. It includes references and further reading. http://www.edn.com/article/CA6636507.html?rid=#EDNRegVisitorID#&nid=2433 [Non-text portions of this message have bee
Thread view
Attachments: 0
2009-02-25 by David VanHorn
> Indeed. The oscillator can be affected by the dynamics of the moment in > your circuit. Motor noise, ground bounce, power brownout, static zap > and other even less understood issues. Bomb-proofing your design is a > major part of the voodoo we (hopefully) get paid the big buck
Thread view
Attachments: 0
2009-02-25 by Dennis Clark
>> The option is there to NOT have that fuse programmed and your part will >> work fine, usually, and on occasion go into the weeds for no apparent >> reason. I've spaced that fuse and scratched my head before. > > Exactly.. Using the "low power mode" is the default, and I don't
Thread view
Attachments: 0
2009-02-25 by David VanHorn
> The option is there to NOT have that fuse programmed and your part will > work fine, usually, and on occasion go into the weeds for no apparent > reason. I've spaced that fuse and scratched my head before. Exactly.. Using the "low power mode" is the default, and I don't know wh
Thread view
Attachments: 0
2009-02-25 by Dennis Clark
> On Wed, Feb 25, 2009 at 10:32 AM, Dennis Clark wrote: >> >>> >>> I know this sounds a simple "of course" type question but: >>> >>> I could have the controller output a 10uSec pulse and read it with a >>> logic analyzer to verify that the timing is correct. >> >> If I were conc
Thread view
Attachments: 0
2009-02-25 by David VanHorn
On Wed, Feb 25, 2009 at 10:32 AM, Dennis Clark wrote: > >> >> I know this sounds a simple "of course" type question but: >> >> I could have the controller output a 10uSec pulse and read it with a >> logic analyzer to verify that the timing is correct. > > If I were concerned I wo
Thread view
Attachments: 0
2009-02-25 by Dennis Clark
> > I know this sounds a simple "of course" type question but: > > I could have the controller output a 10uSec pulse and read it with a > logic analyzer to verify that the timing is correct. If I were concerned I would make sure that the chip is "rail-to-rail" powering the oscill
Thread view
Attachments: 0
2009-02-25 by David VanHorn
On Wed, Feb 25, 2009 at 7:16 AM, englsprogeny wrote: > > I know this sounds a simple "of course" type question but: > > I could have the controller output a 10uSec pulse and read it with a > logic analyzer to verify that the timing is correct. > > [This verifies that the caps are
Thread view
Attachments: 0
2009-02-25 by David VanHorn
On Wed, Feb 25, 2009 at 6:11 AM, Bob Paddock wrote: >>>if ((Raw_Data_Size = 0) & !(GICR & (1 >> if ((Raw_Data_Size == 0) && !(GICR & (1 > (note usage of '==' and '&&') > > Always put the constants on the left: > > (0 ==Raw_Data_Size) Good tip! Thanks! :)
Thread view
Attachments: 0
2009-02-25 by englsprogeny
I know this sounds a simple "of course" type question but: I could have the controller output a 10uSec pulse and read it with a logic analyzer to verify that the timing is correct. [This verifies that the caps are correct for the oscillator] Correct assumption? --- In AVR-Chat@ya
Thread view
Attachments: 0
2009-02-25 by Bob Paddock
>>if ((Raw_Data_Size = 0) & !(GICR & (1 if ((Raw_Data_Size == 0) && !(GICR & (1 (note usage of '==' and '&&') Always put the constants on the left: (0 ==Raw_Data_Size) then the compiler tells you when you make the: (Raw_Data_Size = 0) type errors, because you can not assign a val
Thread view
Attachments: 0
2009-02-25 by David VanHorn
Something wierd is still happening.. I put some single pin diagnostics in, so that I can scope the start and end of the A or B channel pulse measurement. It's always taking the same time, regardless of what the input is doing! Both the start and end of this are triggered by high
Thread view
Attachments: 0