Advanced Gamebuino prototype

Modules, cases, buttons...

Re: Advanced Gamebuino prototype

Postby Duhjoker » Fri Sep 16, 2016 1:11 am

Ok I hooked up my screen directly to a 5.2v 500mah powerboost500c which is my main power. As you can see it lights up just fine. I'm still working on the rest of the wiring but I'm concentrating on the library right now.

Now I did notice a weird glitch with the grounds though. If I hook up the power to the teensy' V-in it works fine but if I attach both the Ground from the battery and the ground from the screen on the same ground pin on the teensy, it shuts both down.


Image
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow

Re: Advanced Gamebuino prototype

Postby Zvoc47 » Fri Sep 16, 2016 9:24 pm

Have you printed out any picture on the display? What is the voltage on the I/O of the display? To what voltages did you connect "3.3V" and "5V" pins of the display?
Zvoc47
 
Posts: 56
Joined: Mon Oct 05, 2015 10:03 pm

Re: Advanced Gamebuino prototype

Postby Duhjoker » Sat Sep 17, 2016 12:08 am

All right man slow down just a bit, lol!

I'm having to re-invent the wheel here or at least upgrade it. This is hard for me software wise due to my in-experience and I'm looking for help every where.

But I want to try to help you since yours should be easier, Since im using a completely different MCU than you are.

1st as I have been told by various members, a regular arduino unit by itself has very lil capacity for color imaging due the memory requirements needed to render the images which will also slow your frame rate down.

This is the main reason I chose the teensy 3.2, it not only has 256k ram but a 32-bit processor. Which is plenty.

Now you have to understand that my MCU is different than a regular arduino and has the same pinouts but in different places. I can tell you my wire scheme but it won't help you since the pinout is a lil different. Since you are using a regular type arduino unit the pinout will probably be the same as the pinout as the arduino uno 3.

I will share my pinout regardless

5v in
Ground
RST = 3.3v /// aka scr_rst
CS = pin10 ///aka chip select //scr_cs
DC = pin9 ////aka RS ///scr_dc
Mosi = pin11 ///scr_din
SCK = pin13 ///aka clk
Miso = pin12
WR = A6 ////aka write enable

No I have not tried to render an image on the screen. That's what I came up with after doing the research.

All of this is already been put down in this thread but here we go.........

Open up settings.h in the Gamebuino library and look at line 70 either using notepad or a free program like visual studio express and create a free account so it bypasses the time blocker.

Write down what you see here that is the pin-out needed to hook up the nokia5110 but it also tells you what some of the needed pins you will need to wire to the arduino. These pins will also be used by the 7775 screen plus a few more.

Now open up the adafruit_gfx.cpp file and scroll down to line 55 and you will that though a couple are named different that it uses the same pinout as used by the Gamebuino settings.h file.

From thier you will have to match the pinout for the arduino uno 3 to the arduino unit you are using now, that I can't spell or pronounce.

Besides what the above tells you, RD will need to be hooked up.

My teensy like most arduino units have a 3v pin near the 5v in, so I just hook the 3v wire from the LCD to the teensy's 5v in. The 3.3v comes from the 5v in but regulated down. Applying power to this pin can give you the magic white smoke. Do Not Apply Power to 3.3v pins!!!
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow

Re: Advanced Gamebuino prototype

Postby Zvoc47 » Tue Sep 20, 2016 5:11 pm

I have ATXMEGA128A1U, but the development board for it has a flex cable output that leads to an adapter that I bought (I need to solder the flex cable to the adapter) and then I'm planning to wire those pins of the adapter to the Inhaos ST7775 display. However, I haven't done that and there's no ST7775 source code for XMEGA AVRs, but only for megaAVRs so this is why I tried using Arduino Duemillanove which uses the same chip as Arduino Uno (and it even runs Gamebuino stuff). I wired 5V I/O from Arduino Duemillanove and I put 5V to where it says 5V and I put 3.3V where it said 3.3V. I used the parallel interface because I like parallel interface more than serial, and parallel is fast. There was no smoke, though, but due to the 5V I/O, I think that the display is dead.

Now, I want to get some questions answered clearly. There's a 5V label and a 3.3V label on the display. If my XMEGA runs on 3.3V, which power pins of the XMEGA should I wire where? As you said that applying power to the 3.3V label will break the display, why does it even say 3.3V there then!? Should I connect XMEGA's 3.3V to the screen's 3.3V? If that's so, what should I put to the 5V label then? I don't have a 5V output on my XMEGA board.

I'm thinking about using XMEGA's External Bus Interface (which is kinda like Arduino Mega's XMEM) which is wired on the same pins where the flex cable goes so that by using the XMEGA's DMA I transfer the picture scanline by scanline. The CPU renders a scanline into a scanline buffer and the DMA transfers it while the CPU serves an interrupt or renders another scanline. I've calculated that this kind of picture updating might be fast enough for a nice gameplay. The picture will be rendered the way the old NES rendered the picture by using tile-based graphics and sprites.

I'd like to talk more about it on a separate thread.
Zvoc47
 
Posts: 56
Joined: Mon Oct 05, 2015 10:03 pm

Re: Advanced Gamebuino prototype

Postby Duhjoker » Tue Sep 20, 2016 8:01 pm

Ok there seems to have been a lil miscommunication on my part.

What I meant was do not apply power the 3.3v pin on your arduino. The 3.3v is supplied by your 5v in. Doing so will kill your arduino.

Your screen will use both the 3.3v and 5v pins.

Your arduino unit will need a 5v in, you can splice a wire from the 5v in back to the screen. It doesn't matter how it's really powered as long as you supply the right voltage.

If you arduino doesn't use 5v then you will need one that does have a 5v input

Do you have the library that summoner123 built with the tilemap routine? It's really really cheap on memory. I managed to get all the maps for Zelda together in the same sketch and it only used half the available memory. This will help
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow

Re: Advanced Gamebuino prototype

Postby Zvoc47 » Tue Sep 20, 2016 11:39 pm

I see. So basically, this ST7775 runs on 3.3V, but has a 5V pin because of the stupid backlight!? They could have made a 3.3V board that has a level shifter so that one could connect either 3.3V or 5V. ST7735 works on both 3.3V and 5V, I suppose. It worked on my Arduino, but not on my XMEGA when I translated the code to it.

Unfortunately, the display is no longer for sale on eBay so I have to find another one. Which one would you recommend?
Zvoc47
 
Posts: 56
Joined: Mon Oct 05, 2015 10:03 pm

Re: Advanced Gamebuino prototype

Postby Duhjoker » Wed Sep 21, 2016 1:29 am

Actually it runs on the 5v and uses the 3.3v pin as the back light. You may not need the 3.3v back light. When I plug mine in its kinda low ligh but very visible.
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow

Re: Advanced Gamebuino prototype

Postby Duhjoker » Wed Sep 21, 2016 9:48 am

Ok ive been playing around with library. I think the first step should be getting the LCD to compile using the teensy's adafruit_GFX.h and c++ files. Which means moving a bunch of stuff from the original gfx to the teensy.

Still having problems and im starting to get frustrated so i think i might try working on the hardware tommorow using the 7775 example, doesnt matter which one.

Maybe ill feel like i accomplished something.

Im a late person so i dont start thinking properly til evening so it will prolly be around 21:00 American CST before i get back to you.

Edit: ok so I was looking at some old 8-bit game graphics when I noticed a pattern in the early games like Mario, Zelda, duck hunt and so on. It looks like they use the same colors over and over again. 16 of them to be exact.

Would it be easier, after getting the library to work, on the memory to set a 16 bit color set palette?
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow

Re: Advanced Gamebuino prototype

Postby Zvoc47 » Thu Sep 22, 2016 8:38 pm

I was thinking about using a pre-made 16 color pallette.
ImageFrom Pico-8.
That would simplify all rendering. Here you have all colors you'd ever want. The MS-DOS pallette sucked so bad. There was no orange. But over here, there's all colors you'd want.

You said the LCD runs on 5V, but why didn't the compiled code run on it? Is that because I used 5V on I/O? Was there a program error or something? This means that on eBay what the guy said that I/O is not on 5V is a lie, but I would like this to be confirmed. What's the correct voltage of the display's I/O?

Also, did you get any picture on the screen? You didn't answer me that question.
Zvoc47
 
Posts: 56
Joined: Mon Oct 05, 2015 10:03 pm

Re: Advanced Gamebuino prototype

Postby Duhjoker » Thu Sep 22, 2016 10:13 pm

It says on the inhaos that the screens IO uses anything from 1.65v to 3.3v. Other than I honestly don't know. I planned on working on it yesterday but got busy with the library again. I don't know about supplying power to your board other than the 5v in, all the other pins that supply power are regulated down from the 5v in. Adding power to any other part or pin to the board could burn it.

Ok I looked at your board and it uses the same pinout as the Uno r3 so what I think you should do is use the pinout for 5110 to the uno. Then instead of trying to compile one of the pre are sketches, write a sketch that will simply display a bitmap image.
User avatar
Duhjoker
 
Posts: 446
Joined: Sat Jul 02, 2016 4:57 am
Location: Where Palm trees grow

PreviousNext

Return to Hardware Development

Who is online

Users browsing this forum: No registered users and 19 guests

cron