Home     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
   
 Home     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

Author Topic: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output  (Read 6698 times)

0 Members and 1 Guest are viewing this topic.

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« on: February 27, 2012, 12:38:55 PM »
Page: 10 Buttons PIC Touch-Pad with BCD Output
Comments from Ion, 2012, 3:02:06


Quote
One more question.
I need in some conditions to press a combination of two buttons on the same time
It will work if i press two buttons
?
Lets, say i press I8 and I10 in the same time
What will be the result ?
If does not take two buttons in the same time, will be
no problem because i can use an other one to represent the combination of the 2 PB simultaneous pressed
But will be nice to have the
opportunity to press two buttons and get the combined result

The circuit cannot accepts 2 buttons. If two buttons are pressed, the last button that is checked form the code will appear. It was not made for this purpose.


Can i use 16F1934 instead of 37 without changing the code ?
Just load the hex file.
Thank you

If this chip has capacitance sensor, probably it will work, but i am not 100% sure.



Quote
On the original 1 Touch design you put a 10K resistor to ground, but i do not see it here.
Do i need to still put it or leave the pin floating?
Thank you
This depends on where you will connect it. You may need them, you may need them not.


Quote
On the art work folder it is a CDR file
I assume it is a CorelDraw file, but Irfanview or Illustrator cannot open it
Will you be so kind
and post it in other common/popular/pdf format ?
Thank you
But i have it in gif as well. It is the same.


Quote
For reason of power saving, can be your PIC in sleep mode ?
Do you have a project where you use sleep with these touch buttons ?
No i do not have such a project. My keycode lock puts in sleep the controller PIC, which in turn turns off this one completely (power off). You have to design this yourself. You can surely get an idea from the keycode lock i made, but i do not think that this will fit your needs

igeorge

  • Guest
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #1 on: February 27, 2012, 15:09:12 PM »
Thank you very much for the answers.
I have an idea how to work now.
I will get the parts today and test it
From your posts, you said the latest with 10 buttons, works perfectly and no bugs.
It is the same statement valid for the 4 buttons in parallel?
Also, if the 4 button in parallel exist, can be expanded to let's say 6 or more buttons.
You do a great job in assembler, but i am clueless on this. Do you have similar code in C, Picbasicpro, or anything else than assembler ?
Thank you
 

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #2 on: February 27, 2012, 21:13:01 PM »
i do not have any c or other similar language, only assembly. as for the buttons, what do you mean "4 parallel"? the circuit has 10 buttons, you can cut them down to 4, but what do you mean "parallel?"

igeorge

  • Guest
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #3 on: March 03, 2012, 14:41:37 PM »
Thank you Kam,
I managed to build , test and be happy your project with 4 buttons and multitouch (i used before the term in parallel).
It works great but i wanted to change the sensitivity
i opened with mplab the asm file , did change slightly the number for PressThreshold_L then i tried to use quick build to generate a new hex
It did fail. Bellow it is the report. Will you be so kind and tell me what i do wrong
Thank you
Ion
----------------------------------------------------------------------
Release build of project `C:\4 PB in paralel\code.disposable_mcp' started.
Language tool versions: MPASMWIN.exe v5.37, mplink.exe v4.37, mplib.exe v4.37
Sat Mar 03 07:18:45 2012
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F1937 "code.asm" /l"code.lst" /e"code.err"
Warning[205] C:\4 PB IN PARALEL\CODE.ASM 17 : Found directive in column 1. (__config)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 17 : Symbol not previously defined (_config1)
Error[126]   C:\4 PB IN PARALEL\CODE.ASM 17 : Argument out of range (not a valid config register address)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 18 : Symbol not previously defined (_config2)
Error[126]   C:\4 PB IN PARALEL\CODE.ASM 18 : Argument out of range (not a valid config register address)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 51 : Symbol not previously defined (t1gcon)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 51 : Symbol not previously defined (t1gval)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 62 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 62 : Symbol not previously defined (z)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 66 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 66 : Symbol not previously defined (z)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 69 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 69 : Symbol not previously defined (z)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 76 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 76 : Symbol not previously defined (z)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 80 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 83 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 83 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 84 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 86 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 87 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 87 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 90 : Symbol not previously defined (portd)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 95 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 95 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 99 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 99 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 100 : Symbol not previously defined (portd)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 109 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 109 : Symbol not previously defined (z)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 112 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 115 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 115 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 116 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 118 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 119 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 119 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 122 : Symbol not previously defined (portd)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 127 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 127 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 131 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 131 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 132 : Symbol not previously defined (portd)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 138 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 138 : Symbol not previously defined (z)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 141 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 144 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 144 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 145 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 147 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 148 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 148 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 151 : Symbol not previously defined (portc)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 156 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 156 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 160 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 160 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 161 : Symbol not previously defined (portc)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 167 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 167 : Symbol not previously defined (z)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 170 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 173 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 173 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 174 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 176 : Symbol not previously defined (passarg1)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 177 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 177 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 180 : Symbol not previously defined (portc)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 185 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 185 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 189 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 189 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 190 : Symbol not previously defined (portc)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 194 : Symbol not previously defined (tmr0)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 195 : Symbol not previously defined (t1gcon)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 195 : Symbol not previously defined (t1gval)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 204 : Symbol not previously defined (intcon)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 213 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 213 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 227 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 227 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 239 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 239 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 251 : Symbol not previously defined (status)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 251 : Symbol not previously defined (c)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 295 : Symbol not previously defined (intcon)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 327 : Symbol not previously defined (intcon)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 327 : Symbol not previously defined (gie)
Error[113]   C:\4 PB IN PARALEL\CODE.ASM 330 : Symbol not previously defined (MainLoop)
Halting build on first failure as requested.
----------------------------------------------------------------------
Release build of project `C:\4 PB in paralel\code.disposable_mcp' failed.
Language tool versions: MPASMWIN.exe v5.37, mplink.exe v4.37, mplib.exe v4.37
Sat Mar 03 07:18:47 2012
----------------------------------------------------------------------
BUILD FAILED

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #4 on: March 03, 2012, 15:49:43 PM »
change the case sensitive: Creating a new project in MPLAB - step 10

igeorge

  • Guest
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #5 on: March 03, 2012, 21:33:54 PM »
Thank you Kam,
I will do it the proper way, following your tutorial
I did try to get easy by using the Quick Build option without making a project -the lazy way.
I understand now the importance to follow some rules.
Normally i do not touch assembler or Mplab.
I am using compilers from Mikroelectronica.
In your case, your project it is so exciting that pushes my limits to go and use resources which normally i avoid.
I will try.
Thanks
Ion

igeorge

  • Guest
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #6 on: March 03, 2012, 22:03:54 PM »
Hello Kam,
Almost there, but i need a last push
I did follow your tutorial, but it did fail again.
I did not create new files, i just added to the project the files i download from your side
All 3 files, asm and the two inc
Here is the message"----------------------------------------------------------------------
Debug build of project `C:\4TouchPB\4TouchPB.mcp' started.
Language tool versions: MPASMWIN.exe v5.37, mplink.exe v4.37, mplib.exe v4.37
Preprocessor symbol `__DEBUG' is defined.
Sat Mar 03 14:58:44 2012
----------------------------------------------------------------------
Make: The target "C:\4TouchPB\code.o" is out of date.
Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F1937 "code.asm" /l"code.lst" /e"code.err" /d__DEBUG=1 /c-
Error[133]   C:\4TOUCHPB\CODE.ASM 335 : Hex file format INHX32 required
Error[133]   C:\4TOUCHPB\CODE.ASM 335 : Hex file format INHX32 required
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\4TouchPB\4TouchPB.mcp' failed.
Language tool versions: MPASMWIN.exe v5.37, mplink.exe v4.37, mplib.exe v4.37
Preprocessor symbol `__DEBUG' is defined.
Sat Mar 03 14:58:45 2012
----------------------------------------------------------------------
BUILD FAILED
 

igeorge

  • Guest
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #7 on: March 03, 2012, 22:19:50 PM »
It DID WORK now.
I had to choose " Generate relocatable code "
Sorry for trouble but it is first time so, i still have lots of unclear points on my head
I will practice and see
Thanks for help
Ion
----------------------------------------------------------------------
Debug build of project `C:\4TouchPB\4TouchPB.mcp' started.
Language tool versions: MPASMWIN.exe v5.37, mplink.exe v4.37, mplib.exe v4.37
Preprocessor symbol `__DEBUG' is defined.
Sat Mar 03 15:14:59 2012
----------------------------------------------------------------------
Make: The target "C:\4TouchPB\code.o" is out of date.
Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F1937 "code.asm" /l"code.lst" /e"code.err" /o"code.o" /d__DEBUG=1 /c-
Make: The target "C:\4TouchPB\4TouchPB.cof" is out of date.
Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\mplink.exe" /p16F1937 "code.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /m"4TouchPB.map" /w /o"4TouchPB.cof"
MPLINK 4.37, Linker
Copyright (c) 1998-2010 Microchip Technology Inc.
Errors    : 0

MP2HEX 4.37, COFF to HEX File Converter
Copyright (c) 1998-2010 Microchip Technology Inc.
Errors    : 0

Loaded C:\4TouchPB\4TouchPB.cof.
----------------------------------------------------------------------
Debug build of project `C:\4TouchPB\4TouchPB.mcp' succeeded.
Language tool versions: MPASMWIN.exe v5.37, mplink.exe v4.37, mplib.exe v4.37
Preprocessor symbol `__DEBUG' is defined.
Sat Mar 03 15:15:01 2012
----------------------------------------------------------------------
BUILD SUCCEEDED

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #8 on: March 04, 2012, 09:46:50 AM »
will we see a video from your construction? 8)

igeorge

  • Guest
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #9 on: March 04, 2012, 11:39:23 AM »
Hi Kam,
I will make it.
But i do not know where to post it
If you want, i can attached in a reply here and you will know what to do with it
Just let me know
It did save me a lot of frustration, on my project where i used before mechanical push buttons
My next goal, very hard one ,as i do not have a clue of assembler, is to implement your project on mine.
I developed as will see a little thermostat for fun .
In my project where i use PIC18F87J90, i have one chip does all: LCD, RTC, Temperature, USART, I2C (this was for EEPROM because i did not implemented to use the flash memory as storage - work in progress)
For your project i used the pic you suggested and interface the outputs to my PIC
I love like i said to have everything under one roof. So i will free TMR0 from what it does now(just a 10 ms time base for some delays), Change the frequency from 8 to 4 and see how i can insert pieces of your code as assembly in my routine, to read the push buttons with my pic.
Lots of work, but i am optimistic

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #10 on: March 04, 2012, 22:07:39 PM »
george, let me give you a piece of advice that roots from my experience: keeping all under one roof is cool, as long as they are member of the same family. You don;t want to keep a furious fury mammoth in your room, do you? There are some things that must be hosted separately. I am not sure if i am good enough to convert this experience to words and try to explain, just keep it somewhere in the back side of your head.

As for the video, don't you have a youtube channel to post it? I'm not sure if you can upload a video in the forum, it is too big.

igeorge

  • Guest
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #11 on: March 04, 2012, 23:01:29 PM »
Thanks Kam,I will keep in mind your suggestions
Ion

igeorge

  • Guest
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #12 on: March 08, 2012, 08:43:07 AM »
Hello,
it is my again and i am at the end of my rope.
I used the circuit for 4 multi touch like i described above and worked great UNTIL ... i decide to move from 40 pins dip to 44 TQFP  package
Big mistake,
The same software , same hardware, but now it does not see channel 4 - aka input 3 on port B
All of them works fine except this one.
It is not the output, it is the input.
On the scope , all other channels have a nice almost square wave, like in the picture, but on Port b3 i have a small sinusoid, which does not show like others.
When i touch it, it just change a little, but still sinusoid, and on my scope it is marker Triggered.
The touch buttons are the same used before., and it is plenty of room between one channel or the others, so no interference.
Please help me to solve the issue.
It is the same software.
I forgot to mention that the new chip run on 3 volts , it is a Pic16LF1937
Thank you
Ion

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #13 on: March 08, 2012, 09:41:43 AM »
strange, very strange. tell me, is the sin wave the same frequency of your mains supply? 50-60hz? if yes, then it acts as antenna and inducts EMI. I am afraid that the port is dead. It is true that on a PIC only one port can be damaged and all others work normally. Try to make the port output and light an LED...

igeorge

  • Guest
Re: Comments regarding the 10 Buttons PIC Touch-Pad with BCD Output
« Reply #14 on: March 08, 2012, 09:55:49 AM »
Sorrrrrrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy
I was looking at different pinout
I looked at QFN instead of TQFP
On TQFP, pin12 is NC, but in QFN it is Port B.3
Works like before e and i am happy
I am going to make a small PCB for it.
Also, looking at the cod I realized that it can be expanded to more than 4 buttons.
I do not know assembler, but i know copy and paste and of course adapting the program to the new changes
This will be my new fun project
Thanks for support