Basic communication with serial port via vice

SYS 64738
jrubin
Member
Member
Posts: 58
Joined: Sun Jun 29, 2014 8:00 pm
Location: Florida

Basic communication with serial port via vice

Post by jrubin » Tue Jul 08, 2014 3:04 am

using the following as a reference

http://www.commodore.ca/manuals/c64_pro ... _guide.pdf

An attempt was made to communicate with the serial port to a device operating at 9600 baud

it was my belief that initiation would be facilitated with

Code: Select all

OPEN 1,2,0, CHR$(140)
based on the information I put together
attempts were then made to send data

Code: Select all

PRINT#1, A$
and receive data

Code: Select all

GET#1, B$
This returns
?ILLEGAL DIRECT ERROR

I might be far off base with the code, but the settings for vice complicate the matter

serial interface is /dev/ttyUSB0

for RS232 settings do I use user port emulation, can it support (140) even though the book says its Non imp.
or should I be using ACIA

has anyone had success communicating via rs232 in Vice in any of there configurations



jrubin
Member
Member
Posts: 58
Joined: Sun Jun 29, 2014 8:00 pm
Location: Florida

Re: Basic communication with serial port via vice

Post by jrubin » Tue Jul 08, 2014 3:39 am

I've further tried

Code: Select all

OPEN 1,2,0, CHR$(140)+CHR$(1)
THIS DID NOT WORK EITHER

jrubin
Member
Member
Posts: 58
Joined: Sun Jun 29, 2014 8:00 pm
Location: Florida

Re: Basic communication with serial port via vice

Post by jrubin » Tue Jul 08, 2014 3:47 am

I SHOULD POST THE objective here for better understanding

1. open a post to the serial interface in vice at 9600 baud (i can go as low as 4800)
The format is 8 data bits, no parity, 1 start bit, and 2 stop bits

140 represents - 1 00 0 1110 (2 stop bits, 8 bits data word length, 9600)
and
1 represents - 000 0 000 1 (no parity, full duplex, unused, x type handshake)

2. print the following info to the port

00 00 00 00 08 (this is hex)

this should cycle the push to talk on the radio

3. as it stands , the radio should return 00 if unkeyed and f0 if currently keyed

dudz
Member
Member
Posts: 140
Joined: Tue Jun 17, 2014 5:40 am

Re: Basic communication with serial port via vice

Post by dudz » Tue Jul 08, 2014 11:46 am

using basic you can not use any of the external interfaces (ACIA), the kernal only supports the userport (and only up to 2400 baud)

User avatar
buzbard
Member
Member
Posts: 22
Joined: Sun Apr 13, 2014 9:06 pm
Location: Washington State

Re: Basic communication with serial port via vice

Post by buzbard » Tue Jul 08, 2014 2:26 pm

The keyword GET can only be used in a running program, BASIC won't allow you to just type it by itself.
Ray...
It's Ok if you don't agree with me, I can't force you to be right.

jrubin
Member
Member
Posts: 58
Joined: Sun Jun 29, 2014 8:00 pm
Location: Florida

Re: Basic communication with serial port via vice

Post by jrubin » Wed Jul 09, 2014 12:33 am

can the basic conventions still be used with a swiftlink or turbo232

the documentation for these devices is for an end user and not for development

dudz
Member
Member
Posts: 140
Joined: Tue Jun 17, 2014 5:40 am

Re: Basic communication with serial port via vice

Post by dudz » Wed Jul 09, 2014 12:54 pm

no, as said, the kernal (and thus basic) does not support them - you have to write your own code (in assembly)

jrubin
Member
Member
Posts: 58
Joined: Sun Jun 29, 2014 8:00 pm
Location: Florida

Re: Basic communication with serial port via vice

Post by jrubin » Fri Jul 11, 2014 2:58 am

Here it is, written in assembly not my greatest work but i got it to function. Im going to refine it in the comming days

https://www.youtube.com/watch?v=7sVyw1phzs0

Post Reply Previous topicNext topic