Internal RPi/CoPro serial link Master

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
Post Reply
mw0uzo
Posts: 202
Joined: Wed Dec 21, 2016 9:00 pm
Contact:

Internal RPi/CoPro serial link Master

Post by mw0uzo » Fri Feb 10, 2017 5:40 pm

On the underside of the Master CoPro board, scratch off some enamel and solder on the MAX3232 converter board with two small pieces of wire
SV204868.JPG
Cut the track on the top side leading to the TX pin.
SV204869.JPG
Cut the track on the underside leading to the RX pin.
SV204870.JPG
Solder wires for the 3.3V supply and TTL serial lines like this
SV204871.JPG
Solder the RS232 serial lines like this
SV204872.JPG
Make a note on the board that its now RS232, so you dont forget. Also on my board the silkscreen print for Gnd and RX is the wrong way around. Correct it.
SV204873.JPG
Use solder wick to clear the holes for pins 2,3,4 of the SIL resistor pack locations by the serial port
SV204875.JPG
Get some header pins, move the plastic all the way to the top, then solder in the header. Move the plastic down to the PCB level.
SV204876.JPG
Fit patch wires to the CoPro board like so
SV204881.JPG

mw0uzo
Posts: 202
Joined: Wed Dec 21, 2016 9:00 pm
Contact:

Re: Internal RPi/CoPro serial link Master

Post by mw0uzo » Fri Feb 10, 2017 5:46 pm

And the other ends of the patch wires to the serial port header like this.
SV204884.JPG
Then:

*CONFIGURE BAUD 7
*CONFIGURE DATA 5
<Ctrl-BREAK>
*TERMINAL
MODE 0
<ENTER><ENTER>

And on the PI

Run sudo raspi-config and enable the serial terminal for login
then
sudo nano /boot/cmdline.txt

and change the baud rate from 115200 to
console=serial0,9600 at the appropriate place

then sudo reboot
Last edited by mw0uzo on Fri Feb 10, 2017 6:06 pm, edited 1 time in total.

mw0uzo
Posts: 202
Joined: Wed Dec 21, 2016 9:00 pm
Contact:

Re: Internal RPi/CoPro serial link Master

Post by mw0uzo » Fri Feb 10, 2017 5:48 pm

SV204880.JPG
* Wires connected wrong here before I worked out why it wasn't working
SV204886.JPG
Last edited by mw0uzo on Fri Feb 10, 2017 7:03 pm, edited 1 time in total.

User avatar
BigEd
Posts: 1890
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Internal RPi/CoPro serial link Master

Post by BigEd » Fri Feb 10, 2017 6:53 pm

Brilliant!

iainjh
Posts: 293
Joined: Mon May 14, 2012 11:18 am
Contact:

Re: Internal RPi/CoPro serial link Master

Post by iainjh » Fri Feb 10, 2017 7:26 pm

thats circularly brilliant! :)

please, that is kjell's level shifter board isn't it?

and, that max3232 board - thats just an arduino-type like this, yes?

http://www.ebay.co.uk/itm/Mini-RS232-To ... SwiDFYLryJ

thanks for confirming!

:):):)

User avatar
fordp
Posts: 955
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England
Contact:

Re: Internal RPi/CoPro serial link Master

Post by fordp » Fri Feb 10, 2017 7:33 pm

There is lots of space on that board to add that as a build option on a future issue.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

mw0uzo
Posts: 202
Joined: Wed Dec 21, 2016 9:00 pm
Contact:

Re: Internal RPi/CoPro serial link Master

Post by mw0uzo » Fri Feb 10, 2017 7:58 pm

iainjh wrote:thats circularly brilliant! :)

please, that is kjell's level shifter board isn't it?

and, that max3232 board - thats just an arduino-type like this, yes?

http://www.ebay.co.uk/itm/Mini-RS232-To ... SwiDFYLryJ

thanks for confirming!

:):):)
Yes and yes! I'll try later a faster rate and a better terminal.

User avatar
BigEd
Posts: 1890
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Internal RPi/CoPro serial link Master

Post by BigEd » Fri Feb 10, 2017 8:01 pm

I use 19200, but with flow control, and I'm not sure if you can get the Pi to do that.

mw0uzo
Posts: 202
Joined: Wed Dec 21, 2016 9:00 pm
Contact:

Re: Internal RPi/CoPro serial link Master

Post by mw0uzo » Tue Feb 14, 2017 6:54 pm

Tips for using TERMINAL rom:

Shift F1 - Bring up command prompt.
MODE 0 : Use this mode
*FX 210,1 : Disable sound, get rid of the annoying beeps every time a character that is misunderstood is received.
*FX 210,0 : Enable sound
*FX 4,1 - Disable cursor editing, or BBC won't send cursor keypresses to Pi
*FX 4,0 - Enable cursor editing
Not yet figured out how to get the Pi to respond to the BBC arrow character codes, this should be possible.
*BASIC - Exit TERMINAL rom and go back to BBC BASIC. Any program you were writing you'll have to OLD. There must be a better way to exit than this?

Transferring a file (ASCII only at the moment, still trying to fix the Pi to be able to send binary files).
<shift-f6> Toggle spool to disable. Default is enabled
<shift-f1> Bring up command prompt
*CARD
*DIN whatever
*SPOOL filename
<enter>
sleep 5 && cat file >/dev/ttyAMA0 && sleep 10
<shift-f6> within 5s
Wait for file to transfer
<shift-f6> within 10s
<shift-f1>
*SPOOL
*TYPE file to check contents

Transferring a binary file (working on this, not yet working properly)
<shift-f6> Toggle spool to disable. Default is enabled
<shift-f1> Bring up command prompt
*CARD
*DIN whatever
*SPOOL filename
<enter>
stty -F /dev/ttyAMA0 -ocrnl -onlcr
sleep 5 && cat file >/dev/ttyAMA0 && sleep 10 && stty -F /dev/ttyAMA0 ocrnl onlcr
<shift-f6> within 5s
Wait for file to transfer
<shift-f6> within 10s
<shift-f1>
*SPOOL
*TYPE file to check contents

Using browser and ncurses type programs, e.g lynx, htop
Must set screen height or only part of the screen is used. Really helps to disable sound *FX 210,1 via <shift-f1>
stty -F /dev/ttyAMA0 rows 31

duckduckgo.com works well via text mode browser lynx
lynx duckduckgo.com

I'll add to this as I solve all the annoying problems.

Post Reply