1 / 22

Video Game System on PIC18 uController

Video Game System on PIC18 uController. Students: David Passov & Vladimir Gorelov Supervisor: Boaz Mizrachi. Inspiration. UZEbox. The game institute - Hydra. Victor Timofeevs game console. Project Goals.

felix
Télécharger la présentation

Video Game System on PIC18 uController

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Video Game System on PIC18 uController Students: David Passov & Vladimir Gorelov Supervisor: Boaz Mizrachi

  2. Inspiration UZEbox The game institute - Hydra Victor Timofeevs game console

  3. Project Goals • Building video game system capable of creating graphics and polyphonic sound using PIC18 microcontroller • Programming an old school Socoban game for the system ,creating image and sound using the above platform.

  4. uController Inputs and Outputs Video out Controls 5V supply Audio out

  5. Choosing the Hardware • A highly popular Microchips PIC18 familycontroller was chosen for the task. • reducing line frequency required PLL support leaving us with PIC18F258, PIC18F2580 ,PIC18F2550(which was chosen) • PIC18 family have maximum frequency of 10 – 12 MIPS, making the use of wire wrapmethod of construction possible instead manufacturing a PCB .

  6. Producing game video - raster scan • VGA is normally operated at 60Hz rate. • Each scan is composed from 525 lines from which 480 carry image information.

  7. Producing game video • For a typical 60Hz VGA update rate and 525 scan lines, a single line scan time is given by: 1/60/525 = 31.74 µsec (25.17 µs for actual video data) • for operation frequency of 10 MIPS single instruction is carried out in 100 nsec ,so we can demand maximum horizontal resolution of 25.17/0.1 = 251 pixels per line

  8. Producing game video • Wait!At least one more instruction is needed to prepare each pixel before sending it to the monitor so the maximum horizontal resolution is cut by half! • Solution: using the USART built in module to store information about 8 pixels during 2 cycles and then use the remaining 6 to concurrently perform calculations .

  9. Producing game video – tiles • We choose to use tiles as the basic screen element (instead of a single pixel) • By considering the above we have chosen to uses tile size of 16x16 pixels. • Total tile number 30 x 15 tiles set on screen.

  10. Producing game audio • We use the PWM module together with second order LPF as DAC to produce the game music and sound effects. • Digitized linear combination of sines is used to produce less artificial sounding audio.

  11. Putting it all together-schematic

  12. Putting it all together-block diagram controls POR VGA out Audio out

  13. Software – os • As mentioned ,the timing is critical for several tasks such as video output and sound generation. • A decision was made to use OSA open source OS. • A combination of interrupts and OS handled task is needed for providing desired results.

  14. Software – functional responsibility • Aspects handled by interrupts • Synch pulse generation • RGB signal generation • Sound generation • Buttons read and de - bouncing • Aspects handled by RTOS • Animation formation • Game algorithm • Sound change

  15. Software – block diagram Interrupt handler Task_Animate Task_Game Sync pulse OSA RTOS RGB signal Sound generation Task_Music Task_sound Buttons read and debounce

  16. Building -Hacking the PS2 mini wheel

  17. Schedule

  18. Schedule

  19. Study main result • For handling task rich embedded systems using concurrency and OS handled prioritized tasks is an elegant and useful solution.

  20. Questions?

More Related