Tapuino, the $20 C64 Tape Emulator

Tapuino, the $20 C64 Tape Emulator

When you click 'upload', do the transmit and receive LEDs flash on the Arduino? Do you have the correct model (Uno, Mega, Leonardo etc.) selected in the software? I would first try uploading a really simple program that just flashes the LEDs or something to make sure that the Arduino is working OK.
 
Last edited:
When you click 'upload', do the transmit and receive LEDs flash on the Arduino? Do you have the correct model (Uno, Mega, Leonardo etc.) selected in the software? I would first try uploading a really simple program that just flashes the LEDs or something to make sure that the Arduino is working OK.

Yeah cheers I have tried that already. Tested the blinky LED and also transmitting serial text to make sure it's working. Model is a Nano clone and is selected in the software. The LEDs flash as expected when uploading.

Regards
 
Hi mate.

I got my parts today and have literally thrown it together on these small breadboards just to test it. I haven't yet hooked it up to the C64 as I want to make sure it's working first.

However, I am currently not getting any activity from the device and was wondering if that is normal without it being connected to the C64?

Everything is powered and I have double/triple checked all the connections, but still getting nothing on the display. Is this supposed to draw power from the C64 or do you power it via the USB port?

Thanks in advance!

Regards


View attachment 73074

Hi,

There is a blocking initialization issue with I2C i.e. the screen which will lock the chip up.
This usually occurs if you have the LCD wired incorrectly, make sure you have the SDA and SCL lines correctly, try swapping them if you get no joy.
Do you get any output over the serial monitor via the Arduino IDE? If not then an I2C problem is highly likely.
I'll put some debugging in to the code now and push it so that serial gets set up and prints appropriate messages.

Let me know :)
-(e)
 
Sorry just had to check the obvious :)

The instructions say "Caution: Do not connect the Nano to both the C64 and PC" - what is the problem with that?
 
Ok,

If you pull the latest code:
On the serial console you should see:

Starting init sequence
I2C init OK
Init...

If you don't get to "I2C init OK" then I2C is not correctly wired.
-(e)

- - - Updated - - -

Sorry just had to check the obvious :)

The instructions say "Caution: Do not connect the Nano to both the C64 and PC" - what is the problem with that?

You'll be feeding power into the C64... generally a bad practice :)
I need to look into some protection circuitry for that (if possible)
-(e)
 
Last edited:
Tapuino, the $20 C64 Tape Emulator

Would a diode on the power from the C64 be enough? That's what I do... Would it be possible to detect USB or C64 power?

(Edit: I use Tapatalk on my phone to access the forum, it pops up a notification on any replies ;) )
 
Last edited:
Wow you guys reply really fast! LOL

I've just tried an LCD example sketch and without changing any wiring at all I can print text to the LCD no problem!

20140723_153912.jpg

Will have a look now at the latest code! Thanks!

Regards

- - - Updated - - -

Hmm

All I am getting in the serial monitor is "Starting init sequence". Nothing else...

As for the issue with the power, how do you power the Nano when connected to the C64? I am currently using your original breadboard layout which shows only 3 wires going to the datasette port.

Thanks
 
Wow you guys reply really fast! LOL

I've just tried an LCD example sketch and without changing any wiring at all I can print text to the LCD no problem!

View attachment 73075

Will have a look now at the latest code! Thanks!

Regards

- - - Updated - - -

Hmm

All I am getting in the serial monitor is "Starting init sequence". Nothing else...

As for the issue with the power, how do you power the Nano when connected to the C64? I am currently using your original breadboard layout which shows only 3 wires going to the datasette port.

Thanks

Ah okay then this is definitely an I2C issue. Which library did you use to print on the LCD?
I believe the problem is that the I2C backpack you are using has a different I2C address to mine.

Look in config.h and find the "LCD_I2C_ADDR" define.
Check that this is the same as the address you used in the other library, I bet its different :)

-(e)

- - - Updated - - -

Would a diode on the power from the C64 be enough? That's what I do... Would it be possible to detect USB or C64 power?

(Edit: I use Tapatalk on my phone to access the forum, it pops up a notification on any replies ;) )

A diode should do it as far as protecting the C64 (possibly, diodes might need to be put on several lines and there is also the 0.7V drop across the diode which might impact), but its still not a great idea to power from 2 different sources.
-(e)
 
A diode should do it as far as protecting the C64 (possibly, diodes might need to be put on several lines and there is also the 0.7V drop across the diode which might impact), but its still not a great idea to power from 2 different sources.
-(e)

I connect an Arduino to the C64 user port data pins and USB at the same time. I think a common ground and diodes on the user port pins should be enough safety- leave the C64 Vcc disconnected from the Arduino.
 
As for the issue with the power, how do you power the Nano when connected to the C64? I am currently using your original breadboard layout which shows only 3 wires going to the datasette port.

Thanks

Check out the 2nd blog post I've got all the wiring there, I take power from the 5V line on the Datasette connector and wire it to the 5V line on the Arduino (not vIN).
I'll update the breadboard diagram later.
-(e)
 
Hi I looked at the example sketch which had the details as follows:

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C



I have also tried a small app called i2cScanner which gives me the following output:

I2C Scanner
Scanning...
I2C device found at address 0x27 !
done



The address in the config.h file is:

#define LCD_I2C_ADDR 0x27


Now I am confused lol!
 
Hi I looked at the example sketch which had the details as follows:

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C



I have also tried a small app called i2cScanner which gives me the following output:

I2C Scanner
Scanning...
I2C device found at address 0x27 !
done



The address in the config.h file is:

#define LCD_I2C_ADDR 0x27


Now I am confused lol!

Hmmm I am also confused, I was sure it was an address issue, oh well!

There is definitely an I2C / LCD init issue otherwise we should be seeing the next line of serial output.
I've just cloned from the github repo into a temp dir and reflashed and all is working as expected.
Let me see if I can put some more debugging in so we can isolate the issue.

Off to have some supper I will post as soon as the debugging is in.
-(e)
 
Off to have some supper I will post as soon as the debugging is in.
-(e)

No worries at all mate don't spend all you're free time on it! I appreciate your help so far. Will figure it out one way or another hehe

Regards

- - - Updated - - -

Also. Just to be sure, I updated my Arduino software to the latest version to find that the program does not compile! (version 1.5.7). I get a huge error message:

Code:
Arduino: 1.5.7 (Windows 8), Board: "Arduino Nano, ATmega328"

Build options changed, rebuilding all

In file included from lcdutils.c:6:0:
memstrings.h:6:1: error: unknown type name 'prog_char'
 extern prog_char S_INIT[];
 ^
memstrings.h:7:1: error: unknown type name 'prog_char'
 extern prog_char S_INIT_FAILED[];
 ^
memstrings.h:8:1: error: unknown type name 'prog_char'
 extern prog_char S_INIT_OK[];
 ^
memstrings.h:9:1: error: unknown type name 'prog_char'
 extern prog_char S_NO_FILES_FOUND[];
 ^
memstrings.h:10:1: error: unknown type name 'prog_char'
 extern prog_char S_SELECT_FILE[];
 ^
memstrings.h:11:1: error: unknown type name 'prog_char'
 extern prog_char S_READ_FAILED[];
 ^
memstrings.h:12:1: error: unknown type name 'prog_char'
 extern prog_char S_OPEN_FAILED[];
 ^
memstrings.h:13:1: error: unknown type name 'prog_char'
 extern prog_char S_INVALID_TAP[];
 ^
memstrings.h:14:1: error: unknown type name 'prog_char'
 extern prog_char S_LOADING[];
 ^
memstrings.h:15:1: error: unknown type name 'prog_char'
 extern prog_char S_LOADING_COMPLETE[];
 ^
memstrings.h:16:1: error: unknown type name 'prog_char'
 extern prog_char S_LOADING_ABORTED[];
 ^
memstrings.h:17:1: error: unknown type name 'prog_char'
 extern prog_char S_DIRECTORY_ERROR[];
 ^
memstrings.h:18:1: error: unknown type name 'prog_char'
 extern prog_char S_MAX_BLANK_LINE[];
 ^
memstrings.h:19:1: error: unknown type name 'prog_char'
 extern prog_char S_TAP_MAGIC_C64[];
 ^
memstrings.h:20:1: error: unknown type name 'prog_char'
 extern prog_char S_UP_A_DIR[];
 ^

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

Weird huh!
 
Don't use the 1.5.x branch, I use 1.0.5. r2 (the 1.5.x branch will probably require some specific changes for support).

I'll put in the debug statements just now :)

-(e)

- - - Updated - - -

Okay debugging is in and pushed to the repo.
What you should be seeing is:

Starting init sequence
D0
D1
D2
D3
D4
D5
D6
D7
D8
I2C init OK

If the output stops after "D1" then the I2C code is stuck waiting for a response.
Which it shouldn't be if the other lib works (can you give me the URL of the other library?).

-(e)

- - - Updated - - -

Hi,

I just noticed a possible bug in the TWI code, its setting the I2C clock at 10000 instead of 100000 .. so its off by an order of magnitude, which might be causing a failure.
If you get a chance, change the line in twimaster.c from:
#define SCL_CLOCK 10000UL
to
#define SCL_CLOCK 100000UL

(add the additional zero) recompile and let me know if it changes anything.
-(e)
 
This is very frustrating...
I tried the library you posted and it works 100% on my set up.
I'll PM you a file with a test LCD project in so we can try and reduce the number of variables at play.

-(e)
 
Given that you have 2 pieces of code, one that is able to init the LCD properly, and one that isn't, could you comment out stuff in the init() until you have isolated the minimum amount of code that still shows that problem? (Might find the line(s) of apparently unrelated code that cause the problem too)
 
Given that you have 2 pieces of code, one that is able to init the LCD properly, and one that isn't, could you comment out stuff in the init() until you have isolated the minimum amount of code that still shows that problem? (Might find the line(s) of apparently unrelated code that cause the problem too)

Just PM's two sample projects, lets see the results from those :)
-(e)
 
Success! Thanks to the awesome testing of stephenfalken we manged to debug this and discover that I was forgetting to set the I2C pullups!

Fixed code has been pushed to the repo.
Please test the full build.

Thanks
-(e)
 
Success! Thanks to the awesome testing of stephenfalken we manged to debug this and discover that I was forgetting to set the I2C pullups!

Fixed code has been pushed to the repo.
Please test the full build.

Thanks
-(e)

YOU SIR, ARE A GENIUS!!!

Working brilliantly now! I know my circuit here is a little 'Heath Robinson', but now its working I am going to assemble it on a piece of stripboard. I have hooked it up to the 5v from the datasette port for now, connected with a broken third party datasette connector.

The only thing I will ask, is that my LCD flickers a little when powered from the C64, more so when loading. Do you think I should be worried about this, it certainly isnt a problem though.

20140724_120710.jpg

Thanks again, I really can't tell you how helpful you were in finding that niggling little issue and your dedication to solving the problem is a credit to you!

I will update pic when I have soldered all into place.

Regards
 
Back
Top Bottom