ahhh,
you are trying to talk me weak for buying PBP3?
may work......
ahhh,
you are trying to talk me weak for buying PBP3?
may work......
Hello Richard,
i tried your example and i get compilation error "DEBUG " bad expression or "SERIN2 bad expression"
I even used a PBP example that was delivered with my software and I get the same "HSERIN bad expression" compilation error.
So I have a software problem but I donīt know where to search.
i tried your example and i get compilation error "DEBUG " bad expression or "SERIN2 bad expression"
a totally meaningless statement
you need to post the complete code you are trying , also state the version of pbp you are using
Warning I'm not a teacher
Hello Richard,
Iīm using an old PC that runs XP Professional.
MPLAB IDE v 7.61
Microcode Studio 3.0.0.5
Compiler Picbasic Pro 2.50C
Programmer PICKIT2 and 3
Complete Code:
'************************************************* ***************
'* Name : AnalogDEBUG *
'* Author : [Davidpower] *
'* [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 05.12.2017 *
'* Version : 1.0 *
'* Notes : 16F88 no LCD *
'* : Portb.7 analog IN 0-5V *
'************************************************* ***************
Include "modedefs.bas"
Define OSC 4
Define ADC_BITS 4 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uSec
DEFINE DEBUG_REG PORTB
DEFINE DEBUG_BIT 2
DEFINE DEBUG_BAUD 9600
DEFINE DEBUG_Mode 0
DEFINE DEBUG_PACING 1000
CMCON = 7 ' Disable analog comparator
ANSEL = %01000000 ' set AN6 (RB7) as analog, others to digital
ADCON1.7 = 1 '
GLCDBM VAR WORD
PAUSE 1000 ' lcd settle time
DEBUG 10,13
loop:
ADCIN 6,GLCDBM ' Read channel 6 (RB7)
DEBUG "*.*",DEC5 GLCDBM,13,10
Goto loop
End
The DEBUG line gives the compiling error "bad expression"
If I use for example :
DEBUG GLCDBM
then no compiling error shows up. Doesnīt mean that it works.
Hello Richard,
to be shure I ordered PBP3 Gold and Microcode studio 5.0 today. Will see if that helps. One question: What Computer do I need for that software?
Regards
Mugel
Hi,
I copied the code in post #16 into microcode studio version 4.0.0.0, selecting 16F88 in the drop down menu and clicked on compile and it compiled using PBP 2.60c with MPSAM 5.06 with no errors
The only change I had to make was change LOOP to MAIN for the main program loop
Mugel if you could use the code tags to insert code it makes the post easier to read ( use [ code ] insert your code here [ / code ] - remove the spaces between square brackets and code)Code:'************************************************* *************** '* Name : AnalogDEBUG * '* Author : [Davidpower] * '* [select VIEW...EDITOR OPTIONS] * '* : All Rights Reserved * '* Date : 05.12.2017 * '* Version : 1.0 * '* Notes : 16F88 no LCD * '* : Portb.7 analog IN 0-5V * '************************************************* *************** Include "modedefs.bas" Define OSC 4 Define ADC_BITS 4 ' Set number of bits in result Define ADC_CLOCK 3 ' Set clock source (3=rc) Define ADC_SAMPLEUS 50 ' Set sampling time in uSec DEFINE DEBUG_REG PORTB DEFINE DEBUG_BIT 2 DEFINE DEBUG_BAUD 9600 DEFINE DEBUG_Mode 0 DEFINE DEBUG_PACING 1000 CMCON = 7 ' Disable analog comparator ANSEL = %01000000 ' set AN6 (RB7) as analog, others to digital ADCON1.7 = 1 ' GLCDBM VAR WORD PAUSE 1000 ' lcd settle time DEBUG 10,13 main: ADCIN 6,GLCDBM ' Read channel 6 (RB7) DEBUG "*.*",DEC5 GLCDBM,13,10 Goto main
Not sure if the code works as it should, but thought I would see if it compiled on an version 2.60 with an old copy of MPSAM...
Bookmarks