Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:13 04 Jul 2025 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: 767
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: 6266
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
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6266
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
 
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.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025