Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 12:00 05 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Cfunction request: Additional console RX

Author Message
Oldbitcollector

Senior Member

Joined: 16/05/2014
Location: United States
Posts: 172
Posted: 09:27am 08 Dec 2014
Copy link to clipboard 
Print this post

I'm not even sure if this is possible with Cfunctions, but since I'm still getting my head wrapped around the basics of Cfunctions, I could use some help.

I need a Cfunction that will allow me to accept (Rx) serial data from another pin and send it into the console. (Allowing incoming control data from two sources at the same time {console and an additional pin) Either this is impossible, or I'm over thinking something that is simple. (not sure)

Thanks
Jeff

My Propeller/Micromite mini-computer project.
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 09:56am 08 Dec 2014
Copy link to clipboard 
Print this post

There is a CFunction, SerialRX - see http://www.g8jcf.dyndns.org/MMBasicIILib/ which enables a program to receive input from a pin and pass that data back to the calling MMBasic program, which could then PRINT that data to the console.

Even simpler if you can use COM1: or COM2:, then it's all standard MMBasic to read characters off COM1/2 and PRINT them out to the Console - No CFunction required.

Is that what you want

PeterEdited by G8JCF 2014-12-09
The only Konstant is Change
 
Oldbitcollector

Senior Member

Joined: 16/05/2014
Location: United States
Posts: 172
Posted: 12:10pm 08 Dec 2014
Copy link to clipboard 
Print this post

I guess what I was really trying to do was change the function of another pin to perform the same job as a console pin which operates without having a program actually "running" in memory. I'm guessing this is well outside of a Cfunction task.


My Propeller/Micromite mini-computer project.
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 12:18pm 08 Dec 2014
Copy link to clipboard 
Print this post

A CFunction must be called from MMBasic, so that means there must be a MMBasic program to start with, and it must have run so as to invoke the CFunction.

The Console port is treated very specially by MMBasic hence I could imagine that moving the Console to another set of pins would be extremely non-trivial !

It maybe that someone, (and I'm definitely not clued up enough to do this), may find a way of using interrupts to call a CFunction so that even though the MMBasic program wasn't actually running (but clearly it must be loaded), the PIC32 would vector to the CFunction on interrupt from a pin.

Peter
The only Konstant is Change
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 01:04pm 08 Dec 2014
Copy link to clipboard 
Print this post

Perhaps this is a case of x divided by zero so to speak - not possible?

I'm trying to understand why you would need to have things setup like this.
Could you please enlighten me?
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024