Now my ISP works, but no video signal
Now my ISP works, but no video signal
Several days age, I found my UZEbox "ISP" can not down program.
http://uzebox.org/forums/viewtopic.php?f=8&t=2044
Yesterday I bought a new ATMEL16 ( no ATMEL644 sold nearby in DIP form) , it can be programmed through my AVRASP programmer in a minimal circuit.
So my avrasp works well. (I doubt it won't work before , it always says avrdude: warning: cannot set sck period. please check for usbasp firmware update).Then I put the ATMEL16 in the UZE Box board I sold, it can not programmed. In default, it uses internal oscillation circuit, so it must be something wrong on my board.After 3 minutes checking, I finally found some sold flaw on some ISP signal line.(check between PIN to PIN, not pad to pad, some PIN is cold sold).
After resold them, the 16 can also be programmed through the ISP. So I installed 644 on my UZE board, it can be programmed!
Then I installed the 644 on the minimal circuit, it won't be programmed. So the 644 (from the kits) only can use ISP on a board using external crystal oscillator about 20M?!
Anyway I programmed my 644 through ISP,
avrdude -c usbasp -p m644 -B 4 -U flash:w:Megatris.hex -U efuse:w:0xFE:m -U hfuse:w:0xD2:m -U lfuse:w:0xFF:m
I connect my UZEboard A/V signal with TV,expect a game showed on TV, BUT there is nothing! The TV shows "no signal ".
The signal on 644 pin 12 is good and stable, the oscillation frequency is about 28M. And the ISP works well.
I checked the documents , and the signal frequency on pin 1 (VIDEO SYNC) should be 15.725 k and pin 4 (VIDEO_CLK ) should be 14.31818 M for NTSC .
But I found nothing on 644 pin 1 and pin 4. I connected my probe directly with pin 1 then pin 4.
So now my question is:
(1) ISP works well , a oscillation signal on pin 12 seems good, does this means 644 works?
(2) I pressed "RESET" several times, but it does not work. I plus 10 k Resist on RESET (PIN 9) and +5 V, it won't work!
(3) How to check pin 1 and pin 4 signals ? maybe directly connecting with 644 pin is wrong, should I sold some extra device?
Thank you very much!
http://uzebox.org/forums/viewtopic.php?f=8&t=2044
Yesterday I bought a new ATMEL16 ( no ATMEL644 sold nearby in DIP form) , it can be programmed through my AVRASP programmer in a minimal circuit.
So my avrasp works well. (I doubt it won't work before , it always says avrdude: warning: cannot set sck period. please check for usbasp firmware update).Then I put the ATMEL16 in the UZE Box board I sold, it can not programmed. In default, it uses internal oscillation circuit, so it must be something wrong on my board.After 3 minutes checking, I finally found some sold flaw on some ISP signal line.(check between PIN to PIN, not pad to pad, some PIN is cold sold).
After resold them, the 16 can also be programmed through the ISP. So I installed 644 on my UZE board, it can be programmed!
Then I installed the 644 on the minimal circuit, it won't be programmed. So the 644 (from the kits) only can use ISP on a board using external crystal oscillator about 20M?!
Anyway I programmed my 644 through ISP,
avrdude -c usbasp -p m644 -B 4 -U flash:w:Megatris.hex -U efuse:w:0xFE:m -U hfuse:w:0xD2:m -U lfuse:w:0xFF:m
I connect my UZEboard A/V signal with TV,expect a game showed on TV, BUT there is nothing! The TV shows "no signal ".
The signal on 644 pin 12 is good and stable, the oscillation frequency is about 28M. And the ISP works well.
I checked the documents , and the signal frequency on pin 1 (VIDEO SYNC) should be 15.725 k and pin 4 (VIDEO_CLK ) should be 14.31818 M for NTSC .
But I found nothing on 644 pin 1 and pin 4. I connected my probe directly with pin 1 then pin 4.
So now my question is:
(1) ISP works well , a oscillation signal on pin 12 seems good, does this means 644 works?
(2) I pressed "RESET" several times, but it does not work. I plus 10 k Resist on RESET (PIN 9) and +5 V, it won't work!
(3) How to check pin 1 and pin 4 signals ? maybe directly connecting with 644 pin is wrong, should I sold some extra device?
Thank you very much!
Re: Now my ISP works, but no video signal
This morning, I still want to make my Uzebox work.
It seems the ISP works well, so I guess the Atmel644 is working.
Maybe it is the fuse bit is wrong? Because the command
avrdude -c usbasp -p m644 -B 4 -U flash:w:Megatris.hex -U efuse:w:0xFE:m -U hfuse:w:0xD2:m -U lfuse:w:0xFF:m
is just copied from another post talking about boot loader,but the game Megatris.hex is not a boot loader, so it is totally wrong?
I checked in this web :http://www.engbedded.com/fusecalc to find the exact meaning of the fuse bits.(hfuse D2, efuse FE,lfuse FF) the meaning is very clear, now I should check the bit control the boot size and reset vector,and what is Brown-out Detector trigger level seems not important.
The meaning is F00~FFF is bootloader, program is from 000 ~ EFF , RESET from 000.
Now the question is : -U flash:w:Megatris.hex the hex file is loaded at which part? boot loader or normal program?
Is this information in internal of "*.hex" file? Is it possible the correct way?
Dear friend, please help me!
I felt frustrated very much, knowing that lots of people have installed UZEBOX on breadboard!
It seems the ISP works well, so I guess the Atmel644 is working.
Maybe it is the fuse bit is wrong? Because the command
avrdude -c usbasp -p m644 -B 4 -U flash:w:Megatris.hex -U efuse:w:0xFE:m -U hfuse:w:0xD2:m -U lfuse:w:0xFF:m
is just copied from another post talking about boot loader,but the game Megatris.hex is not a boot loader, so it is totally wrong?
I checked in this web :http://www.engbedded.com/fusecalc to find the exact meaning of the fuse bits.(hfuse D2, efuse FE,lfuse FF) the meaning is very clear, now I should check the bit control the boot size and reset vector,and what is Brown-out Detector trigger level seems not important.
The meaning is F00~FFF is bootloader, program is from 000 ~ EFF , RESET from 000.
Now the question is : -U flash:w:Megatris.hex the hex file is loaded at which part? boot loader or normal program?
Is this information in internal of "*.hex" file? Is it possible the correct way?
Dear friend, please help me!
I felt frustrated very much, knowing that lots of people have installed UZEBOX on breadboard!
Re: Now my ISP works, but no video signal
Hi,
By the way you do not have to specify fuses everytime you program a hex file. Only once is enough.
It's hard to see what is going wrong. If you ISP works, I recommend making a dead simple AVR program that toggles a pin and verify that this works. Don't even use any Uzebox stuff, just a simple C program.
The 644 from the kits *should* have all fuses pre-programmed. But I can't be sure, I have nothing to do with ITeadStudio Uzebox kits. If that is the case then you absolutely need an external crystal oscillator installed to be able to program the chip.Then I installed the 644 on the minimal circuit, it won't be programmed. So the 644 (from the kits) only can use ISP on a board using external crystal oscillator about 20M?!
If you can program the chip successfully via ISP, then th e644 is ok. Do you validate the code is programmed ok and fuses are programmed ok? Can you read the fuses with something like(1) ISP works well , a oscillation signal on pin 12 seems good, does this means 644 works?
Code: Select all
avrdude -p t25 -c usbasp -U lfuse:r:-:h -U hfuse:r:-:h -U efuse:r:-:h -U lock:r:-:h
What happens if you pull the pin to GND directly?(2) I pressed "RESET" several times, but it does not work. I plus 10 k Resist on RESET (PIN 9) and +5 V, it won't work!
You should have signals there. If not either you have shorts somewhere or there is something wrong with the program that is flashed.(3) How to check pin 1 and pin 4 signals ? maybe directly connecting with 644 pin is wrong, should I sold some extra device?
It is loaded in the normal program space at 0x0000. If there is no bootloader programmed, the 644 automatically jumps and executes at 0x0000.Now the question is : -U flash:w:Megatris.hex the hex file is loaded at which part? boot loader or normal program?
Is this information in internal of "*.hex" file? Is it possible the correct way?
By the way you do not have to specify fuses everytime you program a hex file. Only once is enough.
It's hard to see what is going wrong. If you ISP works, I recommend making a dead simple AVR program that toggles a pin and verify that this works. Don't even use any Uzebox stuff, just a simple C program.
Re: Now my ISP works, but no video signal
Dear uze6666:
I do exactly as you suggested.
The dead program is adapted from
http://www.elec.uow.edu.au/avr/guides/G ... udio-6.pdf
I expect get some signal at PORT B with frequency about 28M/8M*(1/20ms)=1.75k HZ
and the result is
It shows the atmel 644 works well, so maybe the game file is bad? or you have changed port define?
My soldering uses Version F2.
next I will reprogram the bootloader in this web, ( the Megatris.hex is also included?)
"What happens if you pull the pin to GND directly?" Can you explain this further?
I do exactly as you suggested.
The dead program is adapted from
http://www.elec.uow.edu.au/avr/guides/G ... udio-6.pdf
Code: Select all
#include <avr/io.h>
#include <util/delay.h>
#define F_CPU 8000000UL
int main(void){
unsigned char i; // temporary variable
DDRB = 0xFF; // set PORTB for output
PORTB = 0x00; // turn ON all LEDs initially
while(1){
// Send output to PORTB.
// This port will be connected to the 8 LEDs
PORTB = 0xff;
_delay_ms(10);
PORTB=0x00;
_delay_ms(10);
}
return 1;
}
and the result is
It shows the atmel 644 works well, so maybe the game file is bad? or you have changed port define?
My soldering uses Version F2.
next I will reprogram the bootloader in this web, ( the Megatris.hex is also included?)
"What happens if you pull the pin to GND directly?" Can you explain this further?
Re: Now my ISP works, but no video signal
Dear Sir:
After 2 hours working, only got little improvement.
I programmed the boot loader( http://uzebox.org/forums/viewtopic.php?p=3847#p3847),
and find signal on pin 1 and 4 (Atmel644) clear with right frequency. This signal is about 14M, video clk This signal is 15.7k, Video sync, (horizontal sync)
and the audio signal in pin 21, is like this with frequency 111K but it seems no red,green, and blue signal , tested in one port of R7, R11, R19 signal( next port is Gnd).
Any ideas?
I still can not get any video signal on TV!
After 2 hours working, only got little improvement.
I programmed the boot loader( http://uzebox.org/forums/viewtopic.php?p=3847#p3847),
and find signal on pin 1 and 4 (Atmel644) clear with right frequency. This signal is about 14M, video clk This signal is 15.7k, Video sync, (horizontal sync)
and the audio signal in pin 21, is like this with frequency 111K but it seems no red,green, and blue signal , tested in one port of R7, R11, R19 signal( next port is Gnd).
Any ideas?
I still can not get any video signal on TV!
-
- Posts: 1488
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Now my ISP works, but no video signal
JTAG enable fuse?
Re: Now my ISP works, but no video signal
The ports have never changed since day one. Perhaps the HEX you have is corrupted? I attached the one I use to flash the chips for the Adafruit kits. Test it out.It shows the atmel 644 works well, so maybe the game file is bad? or you have changed port define?
My soldering uses Version F2.
next I will reprogram the bootloader in this web, ( the Megatris.hex is also included?)
Unconnecte everything on pin 9 (/RESET) and then use a piece of wire to connect pin9 to GND. If the chip doesn't reset something is wrong."What happens if you pull the pin to GND directly?" Can you explain this further?
-What signals do you have on PORTC pins (the video DAC)?
On the AD725 validate all signals there:
-What signals do you have on pin 6 (RIN), 7 (GIN) & 8 (BIN)?
-VCC on pins 1,4,14,15,16
-GND on pins 2,13
-14.31818 MhZ on pin 3 (4FSC). By the way, you scope show 14.3174Mhz which I find odd, is your crystal really is 28.63636Mhz?
-Is there any signal on pin 10 (COMP)?
- Attachments
-
- megatris.hex
- (166.32 KiB) Downloaded 829 times
Re: Now my ISP works, but no video signal
Today, I have free time, So I continue to do some experiment to find the problem.
-What signals do you have on PORTC pins (the video DAC)?
What signals should I have? So I decided to generate some signal like TV test signal, which is easy to watch by my scope.After 1 hours reading , I write a simple test program adapted from "turorial.c" program, which is like this :
I hope to watch stable signal on Port C, with same frequency, but different phase.
but not so sure, because after the scanning line, there are some "blank" line, after 480 lines,there are no scanning line, next frame, 480 lines, so what should the signal looks like?
I watched it, after downloading the test program. color Red and blue signals.
Why the different color have different frequency? That is the red signal have one more bar than blue and green!
but the last red bar and next line red bar? There should more carefully thinking.
Anyway I think that the color signals is all right (I tested before and after 100nf, c3,c4,c5), now the problem is AD725,maybe I use some interior
capacitance? I read the AD725 document, which said the C8, C9 should be
-What signals do you have on PORTC pins (the video DAC)?
My crystal is 28.63636Mhz, by the label on it.On the AD725 validate all signals there:
-What signals do you have on pin 6 (RIN), 7 (GIN) & 8 (BIN)?
-VCC on pins 1,4,14,15,16
-GND on pins 2,13
-14.31818 MhZ on pin 3 (4FSC). By the way, you scope show 14.3174Mhz which I find odd, is your crystal really is 28.63636Mhz?
-Is there any signal on pin 10 (COMP)?
What signals should I have? So I decided to generate some signal like TV test signal, which is easy to watch by my scope.After 1 hours reading , I write a simple test program adapted from "turorial.c" program, which is like this :
Code: Select all
#include <stdbool.h>
#include <avr/io.h>
#include <stdlib.h>
#include <avr/pgmspace.h>
#include <uzebox.h>
#include "data/fonts.pic.inc"
//void SetTileTable(const char *data)
//void SetTile(char x,char y, unsigned int tileId)
const char MyTiles[] PROGMEM ={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//Tiles black
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,//Tiles Red
0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38,
0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38,
0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38,
0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38,//Tiles Green
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,//Tiles Blue
};
unsigned char i,j,p;
int main(){
//Set the font and tiles to use.
//Always invoke before any ClearVram()
SetTileTable(MyTiles);
//SetFontTable(fonts);
//Clear the screen (fills the vram with tile zero)
ClearVram();
//240 * 224 tiles
//Tile Width=6
//Tile Height=8
// So put 40*28 tiles
for(j=0;j<28;j++)
for(i=0;i<40;i++)
{
SetTile(i,j,i%3+1);
};
while(1);
}
but not so sure, because after the scanning line, there are some "blank" line, after 480 lines,there are no scanning line, next frame, 480 lines, so what should the signal looks like?
I watched it, after downloading the test program. color Red and blue signals.
Why the different color have different frequency? That is the red signal have one more bar than blue and green!
but the last red bar and next line red bar? There should more carefully thinking.
Anyway I think that the color signals is all right (I tested before and after 100nf, c3,c4,c5), now the problem is AD725,maybe I use some interior
capacitance? I read the AD725 document, which said the C8, C9 should be
or maybe the line is too long? the +5v and ground is test using multimeter.Each power
supply pin should be bypassed to ground by a low inductance
0.1 mF capacitor and a larger tantalum capacitor of about 10 mF.
-VCC on pins 1,4,14,15,16
-GND on pins 2,13
Re: Now my ISP works, but no video signal
Frequencies are ok to me, perhaps the slight difference is because that in your color pattern, the last column is red. Change it to black to have the exact same numbers of R,G and B columns. All is well if tou have 480 lines, that is exactly what you should have so all is well on the atmega644 side.Why the different color have different frequency? That is the red signal have one more bar than blue and green!
but the last red bar and next line red bar? There should more carefully thinking.
Capacitances are not so critical, put a 10uf+100nf as per the uzebox schematics to be 100% sure. Otherwise there is something with the ad725. I strongly suspect cold solder or most probably shorted pins. When soldering the chip for my kits, all is black during testing. After reworking the solder, 99.9% of the time it solves the problem and video comes back. There's also a change the chip id dead, but so far I never experienced that.Anyway I think that the color signals is all right (I tested before and after 100nf, c3,c4,c5), now the problem is AD725,maybe I use some interior
capacitance? I read the AD725 document, which said the C8, C9 should be
Re: Now my ISP works, but no video signal
Thanks, UZE6666, it works!After reworking the solder, 99.9% of the time it solves the problem and video comes back.
After check it again, and resold some pin, everything is OK!
I just start to learn sold (when as a university student,I do not think it is important ) , cold sold is hard to check ! Even using multimeter find it is not easy (I guess when check it, some pressure make it connected).
Thank you very much! By this process, I have learned something about fuze setting about ATMEL644 , and just start to learn how Uzebox works in order to generate the color bar. 10 years ago, I know something about ATMEL 8031, I found the micro controller has become very powerful and so more interesting.