Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:00 20 Nov 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 : picoMite Bug report: keyboard ignored while SetPin FIN,10

Author Message
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 719
Posted: 09:49pm 25 Apr 2022
Copy link to clipboard 
Print this post

Hello,

I am working on a program of transmitting text via audio cable for later encoding / decoding ideas etc. so I connected my signal generator to the picoMite and wrote
the following short testprogram:


Option Explicit
SetPin GP0, FIN,10     '100 makes more sense - just a test...
Dim integer freq
CLS

Do
freq = Pin(GP0)

'Display frequency
Text 10,10,Str$(freq,0,3),,5,1,RGB(white),RGB(black)

'Signal Gen. set to sweep between 6500 and 12600 because
'it is easier to catch the frequency

'show the corresponding Char from ASCII (eg. Freq of 6500/100= 65 = A)
Text 10,80,Chr$(freq/100),,5,1,RGB(white),RGB(black)
Loop


PROBLEM:
When the program runs, it is not possible to interrupt / stop the program by hitting "CTRL+C" while - AND THIS IS IMPROTANT - the frequency (in my case sine) is applied to the picoMite. If the program runs and I turn the frequency generator off, everything is fine and I can exit the program by CTRL+C.

The problem is independet from the gate time, even with gate time 1000 the keyboard does not react WHILE fed with the signal. Even when stopped it takes a second or so until I can stop the running program. This leads me to the assumption that in the background there is some kind of buffer which needs to empty and shut down first, so it lets my PS/2 keyboard read it's keys again.

Edit: using the latest version of picoVGA (5.070408)

Greetings
Daniel
Edited 2022-04-26 08:00 by Amnesie
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8298
Posted: 06:38am 26 Apr 2022
Copy link to clipboard 
Print this post

The waveform doesn't matter.
I think FIN is blocking. If so, this would be expected. Try using PULSEIN, where you have better control and accuracy over the measurement, although you'll have to think period rather than frequency.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10620
Posted: 06:45am 26 Apr 2022
Copy link to clipboard 
Print this post

Will look at it. Please confirm that you can CTRL-C OK from the console using teraterm or similar. Please provide your current OPTION settings as I assume you have changed the count pins in use
Edited 2022-04-26 17:06 by matherp
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 719
Posted: 09:38am 26 Apr 2022
Copy link to clipboard 
Print this post

Hi Peter!

I can confirm that CTRL+C works with Teraterm! Only PS/2 keyboard is ignored (WHILE a frequency / signal is fed in). I can only interrupt via PS/2 Keyboard if the signal is shut down on the freq. generator.

My Option List:

OPTION SYSTEM I2C GP14,GP15
OPTION COLOURCODE ON
OPTION KEYBOARD GR
OPTION CPUSPEED (KHz) 252000
OPTION DEFAULT COLOURS WHITE, BLUE
OPTION SDCARD GP13, GP10, GP11, GP12
OPTION AUDIO GP6, GP7, ON PWM CHANNEL 3
OPTION COUNT GP0, GP1, GP1, GP3

Thank you!

Greetings
Daniel
Edited 2022-04-26 19:48 by Amnesie
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10620
Posted: 09:47am 26 Apr 2022
Copy link to clipboard 
Print this post

Please try the attached


PicoMiteVGA.zip
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 719
Posted: 09:58am 26 Apr 2022
Copy link to clipboard 
Print this post

What can I say? Just perfect. Problem solved, case closed :)
Great work and many 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