Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:46 29 Nov 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 : DDS frequency generator using PicoMite

     Page 2 of 3    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6101
Posted: 09:48am 28 Apr 2023
Copy link to clipboard 
Print this post

  Quote  BUT!! this line

"SetPin Peek(byte Peek(word &H9D000090) + 23), INTL, MyInt"  went way over.

At the end it said "Setpin 15 off"  but pin 15 isn't on the schematic??

This is micromite specific and will cause grief.
Check Kevin's code for a work-around.
VK7JH
MMedit   MMBasic Help
 
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 12:55pm 28 Apr 2023
Copy link to clipboard 
Print this post

  TassyJim said  
  Quote  BUT!! this line

"SetPin Peek(byte Peek(word &H9D000090) + 23), INTL, MyInt"  went way over.

At the end it said "Setpin 15 off"  but pin 15 isn't on the schematic??

This is micromite specific and will cause grief.
Check Kevin's code for a work-around.


Yup! it did... wiped out the program memory  I'm just going to read all about the different chips  I can work out what it does, then make my own work round.

Kevin just deleted those lines.. I want to know what they did. But as it points to internal program memory.... No idea.

The interrupt generated just allows a touch to be recorded??
Edited 2023-04-28 23:06 by IanRogers
I'd give my left arm to be ambidextrous
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 899
Posted: 11:55pm 28 Apr 2023
Copy link to clipboard 
Print this post

The Micromite on the PIC32MX170 chip does not have GUI commands so the Touch IRQ pin needs to have an interrupt set.
The Peek(byte Peek(word &H9D000090) + 23) reads the configured T_IRQ pin used when the OPTION TOUCH command is given.
See this thread for details.

MM2 and MM+ Peeks

The I/O pin used for touch IRQ (handy if you want to set an interrupt on touch)
peek(byte peek(word &H9D000090) + 23)


So "SetPin Peek(byte Peek(word &H9D000090) + 23), INTL, MyInt" is equivalent  to
GUI INTERRUPT MyInt if GUI commands are not available.
Latest F4 Latest H7
 
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 08:29am 29 Apr 2023
Copy link to clipboard 
Print this post

Yep..  As a work around I tied the T_IRQ to pin GP11 and GP10.

If I used setpin GP11 the picomite whinges the pin is a system pin
So I used "setpin GP10 blah blah" and it worked..

I forgot I could just use the GUI interrupt LOL...  My first Pico program was a GUI interface and I used it on that.. BUT!! that was a PicoW when PicoW was a no go!!

So I bought a couple of normal pico's.. THEN!!! Peter pigging did the picoWeb..

When life gives you lemons... Chuck em in the bin, coz I hate lemons...
I'd give my left arm to be ambidextrous
 
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 08:24am 01 May 2023
Copy link to clipboard 
Print this post

Well Alrighty then.

Must be something I'm doing.

I have ordered and received ANOTHER! ILI9431 module ( same as  backpack )

I can load okay, Screen works fine BUT!!! SD card write fails badly  low level I/O fault
But this line
"save "myprog.bas" "  removes the SD module completely and garbles the program.

I disconnect, re-load the program via Jim's MM5 edit and it all works again.  Just wondering what Could be the fault

I have double checked all connections I did notice on this SD card the MISO has no resistor in series unlike all the other three.

I may need to put a cap on the sdcard socket.  Is it possible(Ill check this tomorrow), that the 5v comming from VBUS ( 5v )  is powering the SD?  Normally I found that the SD cards are on 3v3..
I'd give my left arm to be ambidextrous
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9131
Posted: 08:32am 01 May 2023
Copy link to clipboard 
Print this post

What version of the RP2040 are you using? Some of them don't have enough power for the ILI9341 and the SDcard. In my experience the black ones with the USB-C connector simply won't work but "genuine" picos do
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6803
Posted: 09:04am 01 May 2023
Copy link to clipboard 
Print this post

The ILI9341 displays that I have have SMD resistors in series with signal lines to the SD card. These are a no-no with some SD cards. Link them out.
Mick

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

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 09:30am 01 May 2023
Copy link to clipboard 
Print this post

So.. I need to supply more power to the SD??  

I will remove the lil smd resistors and link them out.
The PICO is a genuine green pico from PiHut.
All my Pico's and PicoW's are from the PiHut.

I do use a mini SD card with the adapter
I'd give my left arm to be ambidextrous
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6803
Posted: 09:32am 01 May 2023
Copy link to clipboard 
Print this post

Normally mini SD cards are ok. They seem to be a lot less fussy than the full size ones.
Mick

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

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 10:23am 01 May 2023
Copy link to clipboard 
Print this post

Some time ago, I used one of these screen modules with a pic. I couldn't get it to work at 3v3. I had bridged iy on the PCB as my system was 3v3..  Once I removed the link and powered from 5V it all came to life..  I suspect now the resistors are just pulling the current too low..

Ah well At least I have something to go on...

Let you know tomorrow.. Today's a lazy day here in blighty..

BTW... Whats happened to the time on the forum here in UK... 3 hours adrift!!  ON NO!! PM! loads..
Edited 2023-05-01 20:25 by IanRogers
I'd give my left arm to be ambidextrous
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6803
Posted: 11:44am 01 May 2023
Copy link to clipboard 
Print this post

Time? No idea....  Lost a lot of the concept of it when I retired. Brewtime, Dinnertime and Teatime are the important ones. :)

(Having a lazy day...)

Go to My Settings & Change Settings. Set the time to UTC (GMT)+1 'cos we are on BST.
Edited 2023-05-01 21:46 by Mixtel90
Mick

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

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 12:57pm 01 May 2023
Copy link to clipboard 
Print this post

Cheers Mick

You'd think I would know that one..

Now you can see why I'm struggling with the program.
I have a pico connected to the Ardiuino milarky.. C++ I can do.. All day..
But this basic is a bit more involved that the olde speccy...
I'd give my left arm to be ambidextrous
 
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 11:54am 02 May 2023
Copy link to clipboard 
Print this post

Well!!

Removed the three 1K resistors... SD card now fully operational on both display's

Changed the program to use "GUI INTERRUPT Blah"  Just waiting for said module and will report back.

Thanks Mick...  Just checking out the PSU..  Has anyone here made a lil' ESR meter?
I could do with one...
I'd give my left arm to be ambidextrous
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 06:22am 03 May 2023
Copy link to clipboard 
Print this post

Ian, you may want to make it yourself but you can get a small MK-328 based handheld with a screen that does testing for ESR,Cap,resistance,transistor,diode and quite a bit more, all in one device. I bought one about three years ago and it's been pretty good - including the ESR bit. Prices seem to range around $30-$40 on e-bay,amazon,aliexpress etc but I also saw them on alibaba for $16 each for minimum quantity two.
Just Google: "mk-328 tr\lcr\esr tester"

Greg
 
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 07:57am 03 May 2023
Copy link to clipboard 
Print this post

If anyone could lend a pointer.

As I said.. Ported the code perfectly. Thanks to Jim, Mick, Kevin and all others.

@Kevin.. Sorry about NOT using your draft, but if I do it myself, I'll understand it far better.

The question!

I used the same function to detect touch but it didn't work

I tried the pin route and the GUI route, but nada.

If I get rid of the interrupt and use the olde'


Do
Until Touch(x) <> -1


works okay.  What could be the problem with the T_irq? The pin is set up correctly?
I'd give my left arm to be ambidextrous
 
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 02:10pm 03 May 2023
Copy link to clipboard 
Print this post

Does the "touch" interrupt only occur when you define a touch area?

AD9833 just arrived... I carefully made sure the picture didn't show 1k res pack (102)  Guess what.. I has them.. Another job todo...
Edited 2023-05-04 01:11 by IanRogers
I'd give my left arm to be ambidextrous
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6803
Posted: 03:16pm 03 May 2023
Copy link to clipboard 
Print this post

AFAIK it returns a result that depends on what you ask it. e.g. a = TOUCH(X) returns the x co0rdinate in a and b = TOUCH(Y) returns the y coordinate in b. If the screen isn't being touched it returns -1.

It also has multiple uses in the advanced graphic controls, which is where you would define a touch area.
Mick

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

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 03:24pm 03 May 2023
Copy link to clipboard 
Print this post

Cheers again Mick.

Like I said, using the above works for me at the mo..
Once I hook up this module, I'll see whether it was worth it or not.

Its just annoying when the manual says "GUI INTERRUPT Blah, Blah and the result isn't.

I have a picoW on the table here that I program via the Arduino environment, and its talking to the web with no issue's at all, But I can program quite well in C/C++.. Why basic I hear you say. Coz I like to, say's I.
I'd give my left arm to be ambidextrous
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9131
Posted: 04:07pm 03 May 2023
Copy link to clipboard 
Print this post

GUI INTERRUPT only works if you have the GUI commands enabled. Otherwise you can use setpin pinno, intl,myint as per the manual
 
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 04:53pm 03 May 2023
Copy link to clipboard 
Print this post

Thanks Peter...

I'll just leave it as is as it works great..

I'm far from whinging.. What you and Geoff have done is nothing short of miraculous.

Cheers
I'd give my left arm to be ambidextrous
 
     Page 2 of 3    
Print this page
© JAQ Software 2024