{"id":216,"date":"2008-09-10T11:06:10","date_gmt":"2008-09-10T18:06:10","guid":{"rendered":"http:\/\/mightyohm.com\/blog\/?p=216"},"modified":"2022-12-27T18:03:18","modified_gmt":"2022-12-28T02:03:18","slug":"pic-microcontroller-rgb-video-animations","status":"publish","type":"post","link":"https:\/\/mightyohm.com\/blog\/2008\/09\/pic-microcontroller-rgb-video-animations\/","title":{"rendered":"PIC Microcontroller RGB Video &#8211; Animations!"},"content":{"rendered":"\n<p><strong>Update: <\/strong>For those who are interested in seeing how this is done, I have posted schematics and source along with some technical details about this project.\u00a0 <a href=\"http:\/\/mightyohm.com\/blog\/2008\/09\/pic-rgb-video-technical-details\/\">Click here to learn more.<\/a><\/p>\n<p>After two days of straight coding, this is the result &#8211; two more aliens and an animation routine that toggles between 2 images for each alien and changes aliens every n frames.\u00a0 The alien selection routine is implemented as a state machine and uses way too many instructions, but fit within a blank line of video so I called it good.\u00a0 The hardest part again was maintaining a constant number of clock cycles regardless of the program flow through the display loop.\u00a0 This is required to maintain the video timing and keep the LCD happy.<\/p>\n<p>I also changed the image lookup table routine so that the image to be displayed is loaded during the blanking interval above the top of the visible screen.\u00a0 This makes the pixel display much more efficient during the field but at the cost of a bunch of memory.\u00a0 Now instead of execution time during the horizontal line limiting the max resolution, it&#8217;s memory instead&#8230;\u00a0 sometimes you can&#8217;t win.\u00a0 If I encoded color more efficiently the memory limitation would go away.<\/p>\n<p>I need to clean up the code and add some more comments, but I&#8217;ll post the source in case anyone else is interested in learning how to generate RGB video with a PIC or wants to try a similar project.<\/p>\n<p><strong>Update: <\/strong>The LCD display I am using is a Sharp 4L-U4EB I bought surplus years ago.\u00a0 I haven&#8217;t been able to find any more of them since, does anyone have a source?<\/p>\n<p>Here are some still images showing the animation sequence for each alien.\u00a0 Click on each for a bigger version.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mightyohm.com\/files\/flickr\/2845579559_4a81f1af7d_m.jpg\" border=\"0\" alt=\"Still images from space invaders animation\" width=\"240\" height=\"180\" \/> Red!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mightyohm.com\/files\/flickr\/2845579651_8ae7f7fcd3_m.jpg\" border=\"0\" alt=\"Still images from space invaders animation\" width=\"240\" height=\"180\" \/> Green!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mightyohm.com\/files\/flickr\/2846412660_8ee3178085_m.jpg\" border=\"0\" alt=\"Still images from space invaders animation\" width=\"240\" height=\"180\" \/> Blue!<\/p>\n<p>Previous posts related to this project:<\/p>\n<p><a href=\"http:\/\/mightyohm.com\/blog\/2008\/09\/space-invaders\/\">http:\/\/mightyohm.com\/blog\/2008\/09\/space-invaders\/<\/a><\/p>\n<p><a href=\"http:\/\/mightyohm.com\/blog\/2008\/09\/generating-analog-rgb-video-with-a-pic-microcontroller\/\">http:\/\/mightyohm.com\/blog\/2008\/09\/generating-analog-rgb-video-with-a-pic-microcontroller\/<\/a><\/p>\n<p>Also check out my flickr set, <a href=\"http:\/\/www.flickr.com\/photos\/mightyohm\/sets\/72157607122118335\/\">PIC Microcontroller RGB Video<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: For those who are interested in seeing how this is done, I have posted schematics and source along with some technical details about this project.\u00a0 Click here to learn more. After two days of straight coding, this is the result &#8211; two more aliens and an animation routine that toggles between 2 images for &hellip; <a href=\"https:\/\/mightyohm.com\/blog\/2008\/09\/pic-microcontroller-rgb-video-animations\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">PIC Microcontroller RGB Video &#8211; Animations!<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[10,443],"tags":[49,46,502,44,47,45],"class_list":["post-216","post","type-post","status-publish","format-standard","hentry","category-microcontrollers","category-projects-2","tag-invaders","tag-lcd","tag-microcontrollers","tag-pic","tag-rgb","tag-video"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pioCd-3u","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":182,"url":"https:\/\/mightyohm.com\/blog\/2008\/09\/generating-analog-rgb-video-with-a-pic-microcontroller\/","url_meta":{"origin":216,"position":0},"title":"Generating Analog RGB Video with a PIC Microcontroller","author":"Jeff","date":"September 5, 2008","format":false,"excerpt":"Here is a PIC16F628 microcontroller clocked at 20MHz generating an analog RGB video signal with composite sync. This project was inspired by Rickard Gunee's PIC Video Howto which gave me a big headstart in writing the code.\u00a0 Thanks Rickard!\u00a0 I have been wanting to work on this project since reading\u2026","rel":"","context":"In &quot;Microcontrollers&quot;","block_context":{"text":"Microcontrollers","link":"https:\/\/mightyohm.com\/blog\/category\/microcontrollers\/"},"img":{"alt_text":"PIC Microcontroller RGB Video","src":"https:\/\/i0.wp.com\/mightyohm.com\/files\/flickr\/2830216800_9a86edacb1.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":723,"url":"https:\/\/mightyohm.com\/blog\/2008\/12\/programming-and-customizing-picmicro-microcontrollers-by-myke-predko\/","url_meta":{"origin":216,"position":1},"title":"Programming and Customizing PICmicro Microcontrollers, by Myke Predko","author":"Jeff","date":"December 24, 2008","format":false,"excerpt":"Programming & Customizing PICmicro Microcontrollers, by Myke Predko, is probably the best book out there for someone who is starting out with the PIC series of microcontrollers from Microchip.\u00a0 I used Myke's book as both a tutorial and reference when I created my PIC RGB Video Display.\u00a0 Since then, I\u2026","rel":"","context":"In &quot;Books and Resources&quot;","block_context":{"text":"Books and Resources","link":"https:\/\/mightyohm.com\/blog\/category\/books-and-resources\/"},"img":{"alt_text":"","src":"http:\/\/www.assoc-amazon.com\/e\/ir?t=mightyohm-20&l=as2&o=1&a=0071361723","width":350,"height":200},"classes":[]},{"id":235,"url":"https:\/\/mightyohm.com\/blog\/2008\/09\/pic-rgb-video-technical-details\/","url_meta":{"origin":216,"position":2},"title":"PIC RGB Video &#8211; Technical Details","author":"Jeff","date":"September 15, 2008","format":false,"excerpt":"This page summarizes the technical details behind my PIC LCD video project.\u00a0 This is a basic tutorial on how to generate analog RGB video using a PIC16F628 microcontroller. Previous posts on this project: PIC Microcontroller RGB Video - Animations! Space Invaders! Generating Analog RGB Video with a PIC Microcontroller Materials\u2026","rel":"","context":"In &quot;Microcontrollers&quot;","block_context":{"text":"Microcontrollers","link":"https:\/\/mightyohm.com\/blog\/category\/microcontrollers\/"},"img":{"alt_text":"Schematic","src":"https:\/\/i0.wp.com\/mightyohm.com\/blog\/wp-content\/uploads\/2008\/09\/lcd_video-300x244.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":205,"url":"https:\/\/mightyohm.com\/blog\/2008\/09\/space-invaders\/","url_meta":{"origin":216,"position":3},"title":"Space Invaders!","author":"Jeff","date":"September 6, 2008","format":false,"excerpt":"More progress using a PIC microcontroller to generate video.\u00a0 What next?\u00a0 Color is easy.\u00a0 Animations perhaps? PS: If you start looking, these guys are everywhere.","rel":"","context":"In &quot;Microcontrollers&quot;","block_context":{"text":"Microcontrollers","link":"https:\/\/mightyohm.com\/blog\/category\/microcontrollers\/"},"img":{"alt_text":"Space Invaders!!!","src":"https:\/\/i0.wp.com\/mightyohm.com\/files\/flickr\/2835124664_3346a3cd42.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":710,"url":"https:\/\/mightyohm.com\/blog\/2008\/11\/composite-video-with-arduino-daily-duino\/","url_meta":{"origin":216,"position":4},"title":"Composite Video with Arduino (Daily Duino)","author":"Jeff","date":"November 30, 2008","format":false,"excerpt":"Having had some experience generating RGB video signals with the PIC, I have a deep appreciation for the work these guys did in not only generating composite video with an Arduino, but also making a Pong game.\u00a0 The daily duino (need to bookmark that one) has a simpler example based\u2026","rel":"","context":"In &quot;Microcontrollers&quot;","block_context":{"text":"Microcontrollers","link":"https:\/\/mightyohm.com\/blog\/category\/microcontrollers\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/dailyduino.com\/wp-content\/uploads\/2008\/11\/dailyduino_tv.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":664,"url":"https:\/\/mightyohm.com\/blog\/2008\/11\/meggy-jr-an-open-source-rgb-gaming-platform-from-emsl\/","url_meta":{"origin":216,"position":5},"title":"Meggy Jr., An Open Source RGB Gaming Platform from EMSL","author":"Jeff","date":"November 12, 2008","format":false,"excerpt":"Evil Mad Scientist Laboratories just released Meggy Jr., an open source handheld gaming platform that includes cool chunky buttons, support for the Arduino IDE, and an 8x8 RGB LED matrix capable of displaying beautifully pixelated color images. Definitely the coolest EMSL release of 2008 - and just in time for\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/mightyohm.com\/blog\/category\/electronics\/"},"img":{"alt_text":"Meggy Rainbow","src":"https:\/\/i0.wp.com\/mightyohm.com\/files\/flickr\/3024841296_3f97bf82e1.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/comments?post=216"}],"version-history":[{"count":18,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/216\/revisions"}],"predecessor-version":[{"id":15784,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/216\/revisions\/15784"}],"wp:attachment":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/media?parent=216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/categories?post=216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/tags?post=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}