![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hey ; i have atmega32 i programmed it by ponyprog it tells me (( write successful)) but when i put it on bread board and put it into the circuit it doesn't work (( NO o/p) What is the sol. ???????? | |
| |
| | (permalink) |
| what about my device ???? | |
| |
| | (permalink) |
| Including more information might help, like I did; http://www.electro-tech-online.com/m...-pic16f54.html | |
| |
| | (permalink) |
| my program works on proteus with no problems but in fact it doesn't work ? idon't know why may be the mega32 is not working ?? may be the mega32 not working but it could be programmed ? | |
| |
| | (permalink) |
| Really not enough info to guess. I use AVR Dragon and AVR Studio, so not familiar with your programmer. Can you verify or read back what was written to the chip? If the program is in the chip, you know chip is probably good, and need to look for another problem. Checked your fuse bits? I've only changed a few, but know you can do some messed up stuff if not set right. Is the chip being powered correctly? Checked your data sheet? Is your program actually working code? I/Os set proper? You need to post some pictures, schematics, and code if you hope to receive more then wild guesses or basic troubleshooting. You haven't even given a hint as to what your chip is suppose to do, or what sort of experience you have. Is the chip expecting an external oscillator, but you haven't provided one? | |
| |
| | (permalink) |
| this is my code and sch Code: ; WORKING ON 4MHZ CRYSTAL .include "m32def.inc" .cseg ; ////Definitions////; .DEF TMP = R16 ; .DEF LMF = R17 ; .DEF RMF = R18 ; .DEF SW = R19 ; .DEF LF = R20 ; .DEF LS = R21 ; .DEF R_PWM = R22 .DEF L_PWM = R23 .ORG $000 RJMP START ;;;;;;;;;;;;;;;;;;;;;; .ORG $014 RJMP TIM0_COMP ; Timer0 Compare Handler INTERRUPT VECTOR START: ;; ////INIT////:;; CLI ; CLEAR ALL INTERRUPTS LDI TMP ,HIGH(RAMEND) OUT SPH, TMP ; STACK POINTER HIGH LDI TMP ,LOW(RAMEND) OUT SPL ,TMP ; STACK POINTER lOW LDI TMP , 0B00000000 OUT DDRB,TMP OUT DDRA ,TMP LDI TMP ,0XFF OUT DDRC ,TMP ; PORTC AS I/P OUT DDRD, TMP ; PORTD AS O/P ;;///////// CLEAR ALL REGISTERS///////////////////////; CLR TMP CLR SW CLR R30 CLR R31 ;//////////////////////////////////////////////////////; ;/// TIMERS FOR PWM HARDWARE I USED TIMER 1 16 BIT///; ;//////////////////////////////////////////////////////; LDI TMP , 0B11110001 OUT TCCR1A , TMP ; LDI TMP , 0B00001001 ; OUT TCCR1B,TMP SEI MAIN: RCALL SWITCHES RJMP MAIN SWITCHES: SWT: IN SW,PINB CPI SW,0B00000111 BREQ SWT CPI SW,0B00000110 BREQ ST1 CPI SW,0B00000101 BREQ ST2 CPI SW,0B00000011 BREQ ST3 RET ST1: LDI TMP , 0 OUT OCR1AH , TMP LDI R_PWM ,0X5a OUT OCR1AL , R_PWM LDI TMP , 0 OUT OCR1BH , TMP LDI L_PWM ,0X5a OUT OCR1BL , L_PWM RET ST2: ; LDI TMP,0B00000000 OUT PORTD,TMP RET ST3: LDI TMP,0B11111111 OUT PORTD,TMP RET -- the problem: when i apply power on micro it out ( LOGIC 1 ) high on PD5 , PD4 without pressing any switch - Note : the chip is programmed and i read the program from it ? so what is wrong ?? what about fuse bits ? i am using 4MHZ crystal | |
| |
| | (permalink) |
| Waiting................... | |
| |
| | (permalink) | |
| Quote:
Really not to sure about it, need to think on it some. The buttons and resistors stick out as curious, not sure if it's right or wrong. I've only used switches. The program has an Rjmp instruction to a timer interrupt routine, which I didn't see. Maybe someone else will see the problem. If you still suspect the chip, try reprogramming it with some simple code (flash an LED) that you already know works. Not familiar enough with the PWM stuff to know if that's correct. | ||
| |
| | (permalink) |
| Have you tried posting your code on AVRfreaks? | |
| |
| | (permalink) | |
| Quote:
Please mod and then test. Let us see, whether it functions provided your software is correct.
__________________ Regards, Sarma. | ||
| |
| | (permalink) |
| Solved ^_^ ....... ^_^ | |
| |
| | (permalink) |
| Uh............... What seems to be the officer problem? | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| What is a good AVR programmer with debug & HV programming? | blueroomelectronics | Micro Controllers | 19 | 13th March 2008 02:53 AM |
| Connect two AVR | kemo0o | Micro Controllers | 8 | 3rd March 2008 05:41 PM |
| AC Voltage Meter | pursang | General Electronics Chat | 11 | 27th January 2008 02:34 PM |
| CodeVision AVR Help | hitusharpatil | Micro Controllers | 12 | 22nd January 2008 05:10 AM |
| Eclipse IDE for ARM, AVR, and PIC? | linuxguy | Micro Controllers | 9 | 29th September 2007 06:14 PM |