CyberWalkingGuy / arduino-tvout

Automatically exported from code.google.com/p/arduino-tvout
1 stars 0 forks source link

Bug in render_line5c and render_line6c after video pin moved to 7 #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. If pin 1 of the video port is HIGH, then horizontal sync is messed up

What version of the product are you using? On what operating system?
Trunk with video pin on Arduino pin 7.  ATmega328

Please provide any additional information below.

Myles,
(nootropic here).  Since the video moved to port 7, there is a bug in the asm 
routines render_line5c and render_line6c.  These lines near the end need to be 
changed from:

                "svprt  %[port]\n\t"
                "bst    r16,1\n\t"
                "o1bs   %[port]\n\t"

to:

                "svprt  %[port]\n\t"
                "bst    r16,7\n\t"
                "o1bs   %[port]\n\t"

That is, the seventh bit of r16 needs to be written out to the port, not the 
1st bit.  The problem only becomes evident if pin 1 of the port is set.  The 
hsync gets messed up.  I found this while trying to use Arduino pin 1 as a 
digital input with the pull-up resistor set.

Original issue reported on code.google.com by nootropi...@gmail.com on 14 Sep 2010 at 1:11

GoogleCodeExporter commented 8 years ago
Thank you, Ill fix it.

Original comment by mdmetzle@gmail.com on 15 Sep 2010 at 2:29

GoogleCodeExporter commented 8 years ago

Original comment by mdmetzle@gmail.com on 17 Sep 2010 at 4:01