Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 03:04 28 Apr 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 : Comport Interrrupts..?

Author Message
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 761
Posted: 08:34pm 03 Jan 2015
Copy link to clipboard 
Print this post

Evening Gents...

I am trying to setup the com port for Rx interrupts but keep
getting an error msg... Error: A sub/fun has the same name

I wanted to use a subroutine to process it

Open"com1:115200,getbuf"As #1

Do
Loop

Sub getbuf
Print Asc(Input$(1,#1))
End Sub


This was just a simple test program, the real one is a bit larger...
Just not sure what I'm doing wrong...
Edited by Zonker 2015-01-05
 
mpep
Newbie

Joined: 09/11/2014
Location: New Zealand
Posts: 29
Posted: 09:17pm 03 Jan 2015
Copy link to clipboard 
Print this post

Someone correct me if I'm wrong, but I believe that Interrupt labels MUST end with :
Just can't find it easily in the manual Edited by mpep 2015-01-05
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 09:21pm 03 Jan 2015
Copy link to clipboard 
Print this post

You are missing the receive buffer size:
  Quote  It has the form "COMn: baud, buf, int, intlevel, DE, 9BIT, INV, OC, S2"


It thinks you have the variable "getbuf" the same name as a subroutine.

Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 09:22pm 03 Jan 2015
Copy link to clipboard 
Print this post

  mpep said   Someone correct me if I'm wrong, but I believe that Interrupt labels MUST end with :
Just can't find it easily in the manual


The : is only needed when it is a line label and then only for the actual line label, not with any goto's

Jim
VK7JH
MMedit   MMBasic Help
 
mpep
Newbie

Joined: 09/11/2014
Location: New Zealand
Posts: 29
Posted: 09:27pm 03 Jan 2015
Copy link to clipboard 
Print this post

Thanks.
 
Print this page


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

© JAQ Software 2024