Programming

Post here to discuss the original 8x8 Game System.

Moderators: Chuckt, Garth, bitfogav

User avatar
1kiko1
Can't get enough of electronics!
Can't get enough of electronics!
Posts: 57
Joined: Wed Jun 29, 2011 11:16 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Programming

Post by 1kiko1 » Sun Jul 03, 2011 4:25 am

hello brad

i was wondering how you program the microchip for the 8x8 led game system do you just add game by game or is there a specific way on how to do it.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by brad » Mon Jul 04, 2011 6:53 am

Unfortunately I did not program the games to allow multiple games to be on the chip at once. If you want to play a different game, you will need to re-program it.

It would be possible to fit more than one game on there though.

User avatar
1kiko1
Can't get enough of electronics!
Can't get enough of electronics!
Posts: 57
Joined: Wed Jun 29, 2011 11:16 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by 1kiko1 » Mon Jul 04, 2011 11:30 am

How did u do it then

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by brad » Mon Jul 04, 2011 9:04 pm

I just programmed the microcontroller on a breadboard and then placed the chip back in the socket on the 8x8 game system board.

I should have added a programming port to the board in the first place :)

User avatar
sdudley
Moderator
Moderator
Posts: 337
Joined: Sun Mar 28, 2010 1:33 pm
Location: Florida, U.S.A.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by sdudley » Sat Jul 09, 2011 11:07 pm

Programming multiple games on the 16F684A chip can be done but it requires that you use relocatable code not absolute code. It is also very difficult because the 16F648A has progam memory page boundries which require that you use the "pagesel" directive and might possibly need to modify the linker script.

The linker script tells the program where to find all the codepage addresses, databank addresses, etc. (it's simply a map of the PIC's hardware).

If you are interested in finding out more about relocateable code, here is a really good set of tutorials on PIC assembly level programming: http://www.amqrp.org/elmer160/lessons/
He uses the PIC16F84 but that shouldn't matter as all the information will apply to any 8-bit PIC.

Lesson number 16 takes an in depth look at using relocateable code when you write your programs. All of my programs in assembly now use relocateable code.

My suggestion is to go through all of Brad's tutorials first (if you haven't already done so) because Brad explains it like no one else can! Then go through the lessons I just posted the link to. All of the lessons are in PDF format so you can save them to your computer and go through them anytime you want. He starts at the very beginning, from explaining the PIC architecture and installing MPLAB, to writing code for LCD's and other stuff.

You should have plenty of knowledge by the time you get through all of those lessons to do anything you want with the 8x8 game! If you really want to stick with PIC assembly then I highly reccomend this course. I personally have not found a better course to learn from.

Enjoy,

Stacy
Any time you deviate from sequential consistency, you increase the complexity of the problem by orders of magnitude.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by brad » Sun Jul 10, 2011 12:26 pm

Thanks for that Stacy!

Just as Stacy said, it is quite hard due to the limitations of the older 16f pics. When your code get's too large, the pic doesn't really know where to go next in the code so you need to tell it.

That's why I moved onto the 18f pics because all of these problems have been fixed and you can write all the code you want (upto the max for that chip)

User avatar
1kiko1
Can't get enough of electronics!
Can't get enough of electronics!
Posts: 57
Joined: Wed Jun 29, 2011 11:16 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by 1kiko1 » Mon Jul 11, 2011 11:56 am

sorry but what to i do to add all the games in the microcontroller

Thanks

User avatar
1kiko1
Can't get enough of electronics!
Can't get enough of electronics!
Posts: 57
Joined: Wed Jun 29, 2011 11:16 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by 1kiko1 » Tue Jul 12, 2011 3:00 am

an easy way

User avatar
sdudley
Moderator
Moderator
Posts: 337
Joined: Sun Mar 28, 2010 1:33 pm
Location: Florida, U.S.A.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by sdudley » Tue Jul 12, 2011 4:11 am

1kiko1 wrote:an easy way
Unless you are an avid programmer, there is no easy way.

Even if you are a good programmer of many years, it still would not be "easy" and would take thought and time. Programming microcontrollers requires time and patients as well as a lot of studying of the data sheets.

Stacy
Any time you deviate from sequential consistency, you increase the complexity of the problem by orders of magnitude.

User avatar
1kiko1
Can't get enough of electronics!
Can't get enough of electronics!
Posts: 57
Joined: Wed Jun 29, 2011 11:16 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by 1kiko1 » Tue Jul 12, 2011 4:45 am

hello ive been wondering if you know about that programming and changing the game source code so many more games can fit in the microchip can you do it and send me the finished source code so i can put all the games on a single microchip

many thanks

User avatar
sdudley
Moderator
Moderator
Posts: 337
Joined: Sun Mar 28, 2010 1:33 pm
Location: Florida, U.S.A.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by sdudley » Tue Jul 12, 2011 9:44 am

1kiko1 wrote:hello ive been wondering if you know about that programming and changing the game source code so many more games can fit in the microchip can you do it and send me the finished source code so i can put all the games on a single microchip

many thanks
Some time ago I attempted to program the chip with multiple games on it. I never got it to work the way I wanted it to.

When Brad abandoned the 8x8 Game System for the new and improved SPB, I decided to end my efforts and move on to other projects.

Maybe I can try to pull out my old source code and have another look through it, but I think the PIC16F648A just isn't the right microcontroller for such an extensive program.

Who know's, maybe writing the code in Basic would be better, but I am not familiar enough with Basic to attempt that.

If I find the time to work on it again I'll let you know!

Stacy
Any time you deviate from sequential consistency, you increase the complexity of the problem by orders of magnitude.

User avatar
1kiko1
Can't get enough of electronics!
Can't get enough of electronics!
Posts: 57
Joined: Wed Jun 29, 2011 11:16 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by 1kiko1 » Tue Jul 12, 2011 11:37 am

ok thanks

User avatar
sdudley
Moderator
Moderator
Posts: 337
Joined: Sun Mar 28, 2010 1:33 pm
Location: Florida, U.S.A.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by sdudley » Mon Jul 18, 2011 10:08 am

1kiko1,

I just spent the entire weekend (most of it anyway) trying "again" to program multiple games into the 8x8 Game System.

As with my previous efforts, I had no luck! :evil:

I am beginning to believe there is something wrong with the internal architecture of the 16f648a microconrollers. I have tried numberous ways of programming multiple games by using both relocatable code and absolute code. When I run the simulation (using the mplab sim debugger) everything seems fine with most of the programs I have created for it. However, when I program the chip and plug it into the circuit, it gives me a lot of erroneous data.

It may very well be that some of the things I am doing are causing the PIC ports to stay latched when they change states or something like that. This might explain some of the crazy things I am seeing on the display. I have a few more ideas but if they don't work I am going to set it aside for good and just play one game at a time!

Since the 8x8 board does not have a programming port on it, the only way to really find out what is going on is to breadboard the circuit, purchase the MPLAB ICD 18-pin header Interface, and debug it in the circuit. I seriously doubt I will be doing that!

Anyway, I just wanted to keep you posted and let you know I haven't forgot about it.

Stacy
Any time you deviate from sequential consistency, you increase the complexity of the problem by orders of magnitude.

User avatar
1kiko1
Can't get enough of electronics!
Can't get enough of electronics!
Posts: 57
Joined: Wed Jun 29, 2011 11:16 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by 1kiko1 » Mon Jul 18, 2011 10:28 am

thank you very much for your effort.

User avatar
1kiko1
Can't get enough of electronics!
Can't get enough of electronics!
Posts: 57
Joined: Wed Jun 29, 2011 11:16 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Programming

Post by 1kiko1 » Mon Jul 18, 2011 12:05 pm

hey brad do you have the source code of jumpy dot for the 8x8 led game system

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 8 guests