Basic communication with serial port via vice

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

Basic communication with serial port via vice

Post by jrubin »

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: 59
Joined: Sun Jun 29, 2014 8:00 pm
Location: Florida
Contact:

Re: Basic communication with serial port via vice

Post by jrubin »

I've further tried

Code: Select all

OPEN 1,2,0, CHR$(140)+CHR$(1)
THIS DID NOT WORK EITHER
jrubin
Member
Member
Posts: 59
Joined: Sun Jun 29, 2014 8:00 pm
Location: Florida
Contact:

Re: Basic communication with serial port via vice

Post by jrubin »

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
Contact:

Re: Basic communication with serial port via vice

Post by dudz »

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: 24
Joined: Sun Apr 13, 2014 9:06 pm
Location: Washington State
Contact:

Re: Basic communication with serial port via vice

Post by buzbard »

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: 59
Joined: Sun Jun 29, 2014 8:00 pm
Location: Florida
Contact:

Re: Basic communication with serial port via vice

Post by jrubin »

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
Contact:

Re: Basic communication with serial port via vice

Post by dudz »

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: 59
Joined: Sun Jun 29, 2014 8:00 pm
Location: Florida
Contact:

Re: Basic communication with serial port via vice

Post by jrubin »

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

Who is online

Users browsing this forum: No registered users and 9 guests