I²C on a 6502 Single Board Computer - The 65uino

  Рет қаралды 6,143

Anders Nielsen

Anders Nielsen

11 ай бұрын

The breadboard turns into a PCB and you can learn how to do software bitbang I2C in 6502 assembly code using my new project - the 65uino!
Update: Next video is already out, where make the display show text!
• OLED display on a 6502...
You can find the full project description on hackaday.io/project/190260-65...
If you haven't seen it yet, I suggest you check out the video about my "Single Breadboard Computer"
• A 6502 Based Computer ...
You might also want to check out my other video on the 6532 RIOT
• The amazing 6502 suppo...
Source code and hardware files:
github.com/AndersBNielsen/65uino
(Includes spoiler code for next video!)
#hackadayprize #arduino
Credits:
Video by cottonbro studio: www.pexels.com/video/man-peop...
Video by Francesco Ungaro: www.pexels.com/video/close-up...
Video by Tom Fisk: www.pexels.com/da-dk/video/fu...

Пікірлер: 50
@AndersNielsenAA
@AndersNielsenAA 8 ай бұрын
In case you missed it! If you like this video and you'd like some more background, you might want to check out my other video on the 6532 RIOT kzbin.info/www/bejne/fKCYk6qld7yJnrc and the Single Breadboard Computer kzbin.info/www/bejne/qWTXY4SDqtB1iNU
@75slaine
@75slaine 11 ай бұрын
I'm loving this series Anders, keep up the great work 👍
@user-uq2ks2dr4p
@user-uq2ks2dr4p 2 ай бұрын
Looks great. I am so glad you are using assembly, and not going to town with macros everywhere. I am learning 6502 assembly too, and I have lots of arduino modules that use i2c.
@AndersNielsenAA
@AndersNielsenAA 2 ай бұрын
It's a lot more fun when you get good at assembly before you start throwing macros everywhere - also makes it easier to get help. Even makes it easier to get help from chatGPT. It's really eye opening there's really nothing you can't do if you throw enough assembly at it. Then it's only a matter if you really want to :)
@user-uq2ks2dr4p
@user-uq2ks2dr4p 2 ай бұрын
@@AndersNielsenAA I really like your 6502 computer. You have used a 6507 and a RIOT, and I am just using the 6502s with the VIA thing and a at28c256. Your computer is different than Bens and your memory.cfg is different too. I am getting a thing that lets me use a ZIF to a breadboard. I have lots of Arduino modules that use i2c.. so they should be pretty happy to run with 5 volts. Anyone I love what your doing, and I have LOTS to learn and that is fun :)
@AndersNielsenAA
@AndersNielsenAA 2 ай бұрын
It took a while before Ben switched to cc65 - maybe he got some inspiration from my videos too. I certainly got a lot from his :)
@user-uq2ks2dr4p
@user-uq2ks2dr4p 2 ай бұрын
@@AndersNielsenAA He might of. The memory,cfg map is different from Bens, but you have a different setup. I hope to get that software i2c code working on my Ben Eater computer. I have been translating the older Ben assembly to the new Ca65 stuff. I really like it. I want to get the i2c code and print*hello world* I think i2c is not too bothered with going too slow so we should be good. I hear * oh 9600 bps is slow* lol the code will be maybe less than 100 bytes. When I first started I had a 300bps modem. I can't wait to play.
@user-uq2ks2dr4p
@user-uq2ks2dr4p 2 ай бұрын
@@AndersNielsenAA I am looking forward to getting good at assembly, and I like my code clean and well organized. I don't think I will do many macros unless really needed.
@Barnaclebeard
@Barnaclebeard 11 ай бұрын
I really appreciate that you make all these videos just for me, but I'm a little creeped out about where you are getting your audience research from.
@fusca14tube
@fusca14tube 11 ай бұрын
Amazing project!!!! ❤
@MotownBatman
@MotownBatman 11 ай бұрын
Wicked Awesome! I've always wanted to figure out how to "Woz" together an AMD DX4-100 System since I was a 90's Teen. I never had the Patients (Untreated ADHD apparently) to Follow thru with my Minor Acid Etching of simple High School PCBs Let alone Figure Out how to go this In Depth. WELL DONE! Pushing 40 this Summer, I try to Recycle Every PC I find into a Retro Emu system and give it away
@RachaelSA
@RachaelSA 11 ай бұрын
I didn't understand most of this, but I still love it.
@TimsRetroCorner
@TimsRetroCorner 9 ай бұрын
Thanks for this. I've been trying to implement I2C on the user port of a Commodore 64 (6526 rather than 6532), and I'd almost given up. But you've taught me two things: 1 - I've been doing it wrong (yep it's the open drain thing!), and 2 - it *IS* possible!! So I'm gonna be switching to the "signal with the DDR register" technique. One thing I wasn't clear about: do you need external 4k7 pull-ups, or can you rely on whatever's built in to the slave devices?
@AndersNielsenAA
@AndersNielsenAA 9 ай бұрын
You are very welcome! The short answer to your question is: It depends. If the lines/cables are short and the speed is low and the peripherals have pullups you probably don't need to add extras. If you somehow manage to run it at 400KHz through a long bad old unshielded USB-cable, you're probably going to need them. Basically the current through pull-ups has to overcome the capacitance of the conductor before it's time to read the bit - the more capacitance on the line the slower you can go unless you reduce the resistance (add pullups).
@carlo_geiss
@carlo_geiss 2 ай бұрын
a good solution ... but i miss the code of the arduino modul ... i see on the schematic that atmega to convert from the 6502 bus to i2c but there must be a code inside the arduino ... where is it ??????
@AndersNielsenAA
@AndersNielsenAA 2 ай бұрын
No ATMegas used - it’s all 6502 assembly (GitHub link in the description of the video). The I2C subroutines I recently split off into a file called i2c.s - quite a lot of things have been improved since this video.
@denvertech2749
@denvertech2749 11 ай бұрын
What editor and compiler are you using in this video ??
@AndersNielsenAA
@AndersNielsenAA 11 ай бұрын
I just use the cc65 toolchain and Atom but of course any text editor will do. More details and instructions on GitHub and the hackaday.io project page.
@GregCoonrod
@GregCoonrod 11 ай бұрын
Where do you have the best luck sourcing used retro ICs?
@AndersNielsenAA
@AndersNielsenAA 11 ай бұрын
If they’re common enough like 6502s 8088s and Z80s, AliExpress has you covered - sadly they are often blacktopped and relabeled (usually with the correct label tho).
@narayanbandodker5482
@narayanbandodker5482 11 ай бұрын
Waiting for you to connect it to the Internet and make it send its first tweet! But before that, there is this TFT color LCD called ILI9225, which uses I2C as well. Maybe you can try that. I had bought one to try with my D1 mini
@AndersNielsenAA
@AndersNielsenAA 11 ай бұрын
If I remember correctly the D1 has an ESP8266 that happily runs 140x faster than this little 6507 making it a bit more realistic to update that many pixels in color at a reasonable rate :) But there are ways to tweet!
@narayanbandodker5482
@narayanbandodker5482 11 ай бұрын
@@AndersNielsenAA yeah filling all the pixels (even the random dots) will be quite slow. Also a slight correction, the LCD is using SPI not I2C like I said. I misremembered, but the lcd has just one data pin and a clock, causing confusion.
@AndersNielsenAA
@AndersNielsenAA 11 ай бұрын
@@narayanbandodker5482 It can still be done rather easily - just makes pin sharing harder but not impossible
@narayanbandodker5482
@narayanbandodker5482 11 ай бұрын
@@AndersNielsenAA So about the internet connection. There is the W5500 SPI to Ethernet breakout that can connect pretty much anything to the internet. Once you have bit-banged SPI you can do that. It has a built-in TCP/IP stack so you just need to construct the API requests for Twitter.
@AndersNielsenAA
@AndersNielsenAA 11 ай бұрын
There's also the option of using an ESP8266 with AT-commands over serial. Does twitter still have a http API or would I need to make an SSL client in 6502 assembly? :)
@Mr_ToR
@Mr_ToR 8 ай бұрын
3:05 what do you mean by "but wait, that 16x2 LCD screen has way more than the other things" what other things? other screens? other things seen on the screen at that point? like the 6507? other chips? which other chips? 6532? also way more what? pins? more pins than 6532? what do you mean???? so confusing :-(
@Mr_ToR
@Mr_ToR 8 ай бұрын
dude, just say "in 1982 philips invented the i2c protocol to serially do the same things that were previously done in parallel." that simple. also, adding the nxp info further complicates what you're saying. are you talking about the history of phillips or explaining a communication protocol?
@AndersNielsenAA
@AndersNielsenAA 8 ай бұрын
The LCD initially seems to have more pins than the literal 7 other things the arrows at that point in the video are clearly pointing at. Thanks for watching - feedback genuinely appreciated!
@Mr_ToR
@Mr_ToR 8 ай бұрын
​@@AndersNielsenAA Thnx for positively accepting my feedback. That really was my intention since I really enjoyed your whole series of 6502 assembly and implementing i2c and uart. The subject and content is really good. But so many times I had to rewind and watch multiple times just to understand exactly what you meant by a sentence. I think your videos could be at least 2 or 3 times longer and divided into multiple videos with clearer explanation in slower pace. The subject is really very interesting but your videos are more like a report of what you have done than really teaching the actual subject. Forexample, going through with all the debugging and faults is not really beneficial to anything about the subject. I think anyone interested in this kind of thing would not expect any development should work in the first go anyways. Just teach how it works. Forexample Instead of reporting your debugging and the faults you have experienced, go over each part of your assembly and the capabilities of the chip in the video (as in 6532 in your case). Just like how ben does. He never skips over any part of an assembly and gives essential information about the chip, since if you don't understand the chip and the assembly, the whole video becomes like an advertisement of a project and not an educational video, because this is all about the assembly and the chip otherwise just like you said your video, you can use a microcontroller and use a modern high level language and use libraries and never care about how any of anything works. I find any video on any of the 6500 system chips and to be very interesting. I wish there was a modern version of 6530 with eeprom or flash rom instead of a factory rom, which would have made your 65duino even smaller with one less chip ;-). I think Bill Mensch should have produced something like that. Maybe I'll make one at some point with a microcontroller or an soc or a small fpga but that's still not the same thing as using a chip from the original chipset. I have one with a circuit board that combines a 6532 and an eeprom but that is only for repairing vintage computers.
@AndersNielsenAA
@AndersNielsenAA 8 ай бұрын
@@Mr_ToR Thanks for the detailed feedback - I’m still settling in on the right amount of detail.. and there’s a lot pulling in both directions. And many people really seem to enjoy the debugging. I guess you missed my video on the 6532? It does clear up some of the confusion - even if not strictly required.
@Mr_ToR
@Mr_ToR 8 ай бұрын
@@AndersNielsenAA sorry, i didn't mean to disregard the errors and debugging and the process of development alltogether but you can make that stuff as a separate video. keep the chip/assembly part separate. because development, how to deal with errors, finding solutions etc is a separate subject. dont make an already attention requiring subject more confusing by combibing two. forexample, many years ago dealing with errors, debugging and general info on development was interesting for me but not any more since long time. yet i might still watch a video about it when i get bored. however, 6502 assembly and chip info and making something with those and learning about them is still interesting for me. this is very similar to bens videos on designing a cpu. the subject is already interesting enough and requires attention. no need to add other stuff such as general development info or how to make breadboard wires or info on tools or chip company info etc in the same video. those are all interesting topics but maybe as a separate video or maybe something in the intro. slightly brushing over those topics is just reporting that those are topics exist and do not add up to being educational. just say if you want to know more watch this ... video. i wouldnt mind learning about any of them but not when im trying to learn about designing a cpu or a 6502 computer or learning about a communication protocol or implemening a protocol etc or something similar.
@charlesdorval394
@charlesdorval394 Ай бұрын
Screw SPI, long live i²c! :)
@AndersNielsenAA
@AndersNielsenAA Ай бұрын
XD Well I do have some SPI code it’ll also run perfectly fine :D
@vip_bimmervip_bimmer8033
@vip_bimmervip_bimmer8033 8 ай бұрын
Where is the best place to purchase the hardware for this?
@AndersNielsenAA
@AndersNielsenAA 8 ай бұрын
At the moment the easiest way is to send off the Gerber zip file off to a PCB manufacturer, get 6507 + 6532 from ebay/aliexpress and the other parts from digikey, farnell, aliexpress etc. I might offer it as a kit at some point.. soon-ish..
@vip_bimmervip_bimmer8033
@vip_bimmervip_bimmer8033 7 ай бұрын
@@AndersNielsenAA I got the boards and am wondering if I need to buy a different eeprom than the one I have already. I have a couple AT28c256's, will these work?
@AndersNielsenAA
@AndersNielsenAA 7 ай бұрын
@@vip_bimmervip_bimmer8033 Those need the WE pin tied high and maybe some other jumpers - it’ll help if you compare the pinouts and have a look at my “hacking ROMs “ video.
@JohnDoe-bq6wr
@JohnDoe-bq6wr 7 ай бұрын
Why you have deactivated the videos on hackaday? I am asking for a friend.
@AndersNielsenAA
@AndersNielsenAA 7 ай бұрын
I haven’t “deactivated” videos on Hackaday. My default setting however is to have embedding disabled unless I’m asked to specifically allow it (and I always do if Hackaday or the comment section asks) but embedded videos perform worse and have more ads.. and who likes that?
@stephk42
@stephk42 8 ай бұрын
Would this technically be an Arduino 2600? 😅
@AndersNielsenAA
@AndersNielsenAA 8 ай бұрын
Close - but as you'll see in the later videos I have to make up for the missing Television Interface Adapter somehow :)
@zukjeff
@zukjeff 11 ай бұрын
AY3-8910...sound chip from the Intelivision game controller... I have a few in the shed...don't make me use them again...please.
@AndersNielsenAA
@AndersNielsenAA 11 ай бұрын
I won't rule out trying it with my 6502 SBC R1(The 65uino here isn't well suited to interfacing things straight to the data bus) but I'm leaning more towards some of the Yamaha FM synths because they sound better - even if they're more of a late 80s thing than a late 70s thing like the 8910 :)
@Mr_ToR
@Mr_ToR 8 ай бұрын
13:40 i don't understand the following sentence "since the clock pin is conveniently located on the pin 0 of DRB". DRB is not a chip, so what do you mean by pin 0 of it??? are you saying DRB is set by pin 0? are you saying pin 0 is clock input? are you saying pin 0 is clock output and also DRB set pin? are you implying DRB is 6532? so confusing... isn't DRB a register in 6532? all the pins of 6532 have names in the database and there isn't a pin called pin0 on the 6532 by the way. what do you mean by pin 0, which pin is the clock pin of 6532? is this video only for people who know how to use a 6532? also i don't understand what is convenient. the physical placement of a pin called pin0 or that a pin is used to set DRB and also 6532 uses it as a clock pin? what is the convenience :-( so frustrating when you see a very interesting topic, great examples and nicely done video but language is so frustrating that you better do something else than spending more time trying to decipher bad sentences than thinking about the actual subject :-(
@AndersNielsenAA
@AndersNielsenAA 8 ай бұрын
Pin 0 of a register makes pretty good sense when it's mapped bit for bit to physical IO pins - but I know what you mean. I could've said bit 0 for clarity I guess. Using bit 0 of an IO register as the clock is convenient because you can use INC/DEC instructions to toggle the pin.
@JarppaGuru
@JarppaGuru 5 ай бұрын
1:03 if it work like that. new chips allready manufractured even you buy old and your chips not go waste land if you put them attic haha win win. how much manufracturing pcb makes this nonsense xD same as lets make usbc standard even iphone have to use it NOT matter if iphone would give apple-usba cord so everyone can charge. saving packaging cost and not give usbc charger make morew packaging cost. people needs buy usbc charger anyway for one time bcoz no usbc-usba cable. its usbc-usbc on phone package LOL. trying make better actually made it worse. i had exactly this problem when first time buy usbc phone. no charger. no usbc-usba cable to charge it even pc or older charged that has usba LOL. its not matter what connector phone has if end of cable hace widdly used connector i mean usba we have same problem when usbd or what eva comes next lol lol. they should give usbb-usbc cable bcoz nobody have usbd charger for first time lol
@AndersNielsenAA
@AndersNielsenAA 5 ай бұрын
The faster chips sell == the more are manufactured. If more recycled chips are used instead of new ones, then less chips are manufactured == less total waste.
My 6502 SBC R1 Complete hardware overview
23:10
Anders Nielsen
Рет қаралды 10 М.
A 6502 Based Computer on a Single Breadboard
20:45
Anders Nielsen
Рет қаралды 30 М.
О, сосисочки! (Или корейская уличная еда?)
00:32
Кушать Хочу
Рет қаралды 8 МЛН
Would you like a delicious big mooncake? #shorts#Mooncake #China #Chinesefood
00:30
Do you have a friend like this? 🤣#shorts
00:12
dednahype
Рет қаралды 45 МЛН
Transform your home into a smart space with Tuya
3:57
GIDCOMP English
Рет қаралды 12
Running MSBASIC on my breadboard 6502 computer
36:53
Ben Eater
Рет қаралды 194 М.
Coding x86 Pong as a BIOS extension is fun!
37:53
Anders Nielsen
Рет қаралды 3,2 М.
This 9$ Universal ROM Burner is Open Source!
16:36
Anders Nielsen
Рет қаралды 33 М.
I Designed a PCB for my RC Transmitter
15:55
Aecert Robotics
Рет қаралды 8 М.
Is this the FASTEST and CHEAPEST 8-Bit Computer Ever?
28:43
Noel's Retro Lab
Рет қаралды 155 М.
VGA from an EPROM, is it possible.
15:04
DrMattRegan
Рет қаралды 52 М.
EEVacademy #4 -  I²C (I2C) Bit Banging
10:57
EEVblog
Рет қаралды 73 М.
You just saved $60 on a ROM programmer. Thank AI.
35:30
Anders Nielsen
Рет қаралды 3,3 М.
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 9 МЛН
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 2,6 МЛН
С Какой Высоты Разобьётся NOKIA3310 ?!😳
0:43