Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Snake game led matrix 8*8 pic16f1937

Status
Not open for further replies.

Cut3Po1SoN

New Member
Hi there.I have my snake code in c which works perfectly, but i dont know how to display the snake on my matrix using pic16f1937 uc.I thought that i have to use interrupt function but have no idea how to turn on exactly the fruit led and snake's leds. My snake is a vector of x and y components(snake[].x,snake[].y).
Some ideas?Thanks in advance!
 
If you check my PIC tutorials there's an example for an 8x8 LED matrix, this uses timer interrupts to create the display, you simply write what you want to the memory for it, the interrupt routine does the rest. It's written in Assembler, but Ian Rogers has done C versions.
 
Ok i understood but how to use multiplexing for my snake?Whenever an interrupt occurs i display just one part of my snake?
 
You don't even need to know - you just update the memory and the ISR does it all transparently.

OP: How does a black box work?

Nigel: "You don't need to know"

When is this how a forum works?
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top