Michael

Forum Replies Created

Viewing 15 posts - 721 through 735 (of 1,008 total)
  • Author
    Posts
  • in reply to: Help with assemblercode in Closed Caption #950
    Michael
    Keymaster

    The assembler for capturing image data is very carefully crafted to be timed exactly. The approach is to read the analog comparator value to determine if a pixel should be “on” or “off”. This loop represents the capture of 8 bits (8 pixels), then it repeats until the screen is done.

    For each pixel the code is something like this. I’ve included more comments


    "in __tmp_reg__,%[acsr]nt" //2 -- this is the 2nd bit of the byte we are capturing. Read the ASCR register into __tmp_reg__
    "bst __tmp_reg__,5nt" // store the 5th bit of this value into T. 5th bit is analog comparator val
    "bld r16,6nt" // load T into the 6th bit of r16. r16 is the byte that holds the captured bits
    "delay2nt" // delay 2 cycles for perfect timing

    Study the AVR assembly guide and you’ll understand each instruction:
    http://www.atmel.com/Images/doc1022.pdf

    No, this can’t be sped up! This is written in assembly so we can do it as fast as possible. There isn’t even a spare cycle to be had. That’s why you can only do LOW resolution with the TVout library — the processor can’t run fast enough to capture or output pixels at the same rate as the TV scan rate.

    in reply to: Question on joysticks and paddles? #937
    Michael
    Keymaster

    JDraugr, sounds like you’re having fun. When a button inside the joystick is “pressed” (like when you move hte joystick up), does that connect the pin (in this case WHT) to ground? That’s the way the inputs on the Hackvision are programmed; a button press is indicated by the pin being connected to GND.

    It looks like there are enough digital input pins on the hackvision to accomodate two joysticks. Joystick A would connect to pins D2,D3,D4,D5,D10 just like the onboard buttons. Joystick B could connect to pins D6,D8,D12,D13 and A0 that are broken out on the right side of the board. The software would need to be changed to look for input on these pins for Joystick B input.

    Regarding the button pin being shared between joystick and paddle — that should be fine to have it wired to both connections on Hackvsions (D10 and D0). When the button is pressed it will connect to ground and the software can detect that.

    I think you are on the right track — just do some experimentation. Start with one DB9 connector for one joystick/paddle wired to D2, D3, D4, D5, D10 for joystick and D0,A3 for the paddle.

    in reply to: schematic #947
    Michael
    Keymaster

    Yes, the Eagle schematic and board files are in the file downloadable on the design page:
    http://nootropicdesign.com/ve/design.html

    in reply to: 4 CMOS/PAL camera #946
    Michael
    Keymaster

    The Video Experimenter only has one input and one output. They are composite video. Wireless transmission of the frame buffer is probably beyond what the ATmega328 can do.

    in reply to: How many games can be stored on the Hackvision? #945
    Michael
    Keymaster

    It depends on how the game author wrote their code. For the games I wrote (Space Invaders, Asteroids), the answer is no. The scores will be preserved.

    in reply to: How many games can be stored on the Hackvision? #943
    Michael
    Keymaster

    It depends on how much code and memory is required by the game. For Space Invaders, I was able to squeeze a simple Pong implementation into the same program. But Asteroids was too big to fit anything else.

    No plans for additional storage. Just upload different games if you want to play something different.

    in reply to: Frequency of the beeping sound #941
    Michael
    Keymaster

    Perhaps you could tell us what “the CS game” is.

    in reply to: Frequency of the beeping sound #940
    Michael
    Keymaster

    Yes you can change the code to make the sound different. Do you have a USB to serial adapter?

    I have no idea what “the CS game” is….

    in reply to: Coding for wires #1080
    Michael
    Keymaster

    No, but you can use one of the LED connections if you want. That’s one way to connect to something external.

    I didn’t want to make it too easy to control external devices in case someone wanted to make something actually dangerous.

    in reply to: Coding for wires #1082
    Michael
    Keymaster

    Not sure I understand what you mean by connecting to outside boards. What do you want to do?

    Study the source code available on the Hack page: http://nootropicdesign.com/defusableclock/hack.html
    The code for assigning the wires is in the function [tt:1lildtnm]countdown()[/tt:1lildtnm]. Just change this code if you want it nonrandom.

      // assign random pins
    defusePin = random(WIRE_1, (WIRE_4+1));
    detPin = defusePin;
    while (detPin == defusePin) {
    detPin = random(WIRE_1, (WIRE_4+1));
    }

    To require a particular sequence, you’d have to be more clever, but the work is in the function [tt:1lildtnm]countdown()[/tt:1lildtnm]. With some coding skill, you can do it.

    in reply to: Remote display – other required pins #1111
    Michael
    Keymaster

    Hey, nice job! So few people have the skills to hack around with the timer routines, etc.

    in reply to: Wiimote camera and video experimenter #1110
    Michael
    Keymaster

    I’m confused – the Video Experimenter shield is a chip for processing composite video. What is your composite video source?
    Or are you saying that you want to use the VE shield for video output only, and not for processing an incoming video signal?

    in reply to: voltage regulator problem #1115
    Michael
    Keymaster

    mes64,
    Please contact orders@nootropicdesign.com to arrange for a replacement kit.

    in reply to: Remote display – other required pins #1114
    Michael
    Keymaster

    Yes, you need to run 5V, GND, and pins 2-5. And the reset line if you want that capability.

    I’m completely shocked that it is working on a Max32, as the digital outputs are only 3.3V on that board, and the Digit Shield requires 5V logic levels….!!

    in reply to: Replace LED_TOP with IR LED to control TV ??? #1073
    Michael
    Keymaster

    No, you cannot power a motor from the output pin connected to the LED. An output pin of the ATmega328 cannot source that much current. You would need to use the output pin to control a transistor which in turn switched the current for the motor.

    You can make the code mod by getting the source code from the hack page:
    http://nootropicdesign.com/defusableclock/hack.html

Viewing 15 posts - 721 through 735 (of 1,008 total)