Activity for G. C.

  • G. C. G. C. posted a comment on discussion Open Discussion

    Sorry, I realized immediately that it's not possible.. Just discard the last post.. Executing a DIM instruction will put to zero the flag anyway, and my problem is to check during the normal operations that if there is a power failure, the cpu must go in sleep, and preserve only WDT/RTC data and oscillators..

  • G. C. G. C. posted a comment on discussion Open Discussion

    What happens when the Watchdog has reset from Sleep the CPU? The execution starts from the beginning of program like the one of a Master Reset, or it returns to the Do-Loop? I may leave the sleep instruction just before the do-loop starts in such case .. If the pwr_down variable in RAM is preserved during the Sleep (provided the battery backup is still powering the CPU), then the if pwr_down=15 then sleep put before the do-loop could be the solution. I'll give it a try. But still do not understand...

  • G. C. G. C. posted a comment on discussion Open Discussion

    That's what I said I did in my previous post.. Down here is the flow of the program at present. The sleep instruction works only if put outside ISR and outside the main Do-Loop. Can't understand why. config & vars etc .. if I put SLEEP here, it works and gets executed .. Do forever ... other stuff to do forever... 'reset the Watchdog Timer ClrWDT 'if a flag of low voltage is set, put CPU to sleep if pow_down=15 then pow_down=0 sleep 'also here does not get executed end if loop sub Interrupt_Handler...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Done some tests.. if I put the sleep instruction just after the config stuff and varaible declaration etc, it works. So I tought it was the use inside the ISR that was not possible. Then I changed the ISR removing the sleep instruction and made it to set a flag that the interrupt was served (i.e used a variable set to a known value like pwr_down =15); I would then check into the do-forever-loop if pwr_down=15 then sleep.. But also inside the loop the sleep instruction does not get executed. Very...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Chip is the 18LF24J11. For all the other questions you made, except for the work outside the ISR, the answer is yes: On interrupt works, the HLVD event fires it, portB is cleared, but then if I measure the current absorbtion from a backup battery, I see some mAmps, as if the sleep mode is not initiated. I will try to simplify the overall program and see if sleep works outside the ISR. But just want to make sure the simple "SLEEP" syntax is correct or it's required some special character like # or...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hi, I am trying to experiment with low power modes, and using the Voltage failure interrupt I would like to put the mcu at sleep.. Down here the part of code used, basic and resulting assembler. The event of the HLVD module happens, the interrupt generated, but the SLEEP command does not get executed.. I can't find reference to such instruction on the Help, so I am not sure if the syntax is correct. I tried upper and lower case, no way , the CPU absorbs few mA instead of some tens of uA. Suggestions?...

  • G. C. G. C. posted a comment on discussion Open Discussion

    I think I finally figured out the way to unlock it.. My instructions sequence were correct, but there is a "misterious", or at least not well documented description of a Control Lock register, wich requires the following sequence of writes to the "virtual" (not a physical register) EECON2 register: EECON2=0x55; EECON2=0xAA; This is needed to enable Table read/writes of banks of memory fm Flash(16bits) to Ram (8bits). It also enable the writing of PPS register that contain the RTC portion.. So, if...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Sorry to bother again on this, but I can't get the RTC working.. I think I did all the necessary settings to enable the module and it's clock correctly. I see on the scope that the T1 oscillator is resonating with the external xtal at the 32Khz, but when reading minutes and second values, I get out fixed values, non BCD coded, and it seems that the RTC is not counting at all.. Any suggestion? Rgds, GC 'sets the RTC clock to Timer1 oscillator as external crystal 32768Hz, to feed the internal RTC T1OSCEN=1...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Can't get the RTC clock source set to Timer1 oscillator, where I put a 32Khz xtal on pin 11/12.. None of these commands work: 'RTCOSC =1 'CONFIG3L.RTCOSC=1 'CONFIG3L.1=1 I always get "Variable CONFIG3L (or RTCOSC) was not explicitly declared".. There is something to change in the chip .DAT file, perhaps?

  • G. C. G. C. posted a comment on discussion Open Discussion

    Well, I tought to give it the last try to it with your suggestion: RPOR14 = 0x000E And it works! Now that the pin it's correctly remapped, the HPWM command works fine.. Thank you Evan, have a good day. GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    Ok, understood.. I won't loose too much time on it to make it work. It's a pity, tough, as all the other stuff was working well - I was trying to make a 7seg clock out of it, as it's the only chip I currently have on my desk with an RTC onboard. Will look after a 28 pin similar device, but more modern. Thanks, bye. GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    I also tried this, looking after other examples of similar uCs generated by the PPSTool.. But also this is not working. #chip 18lf24j11,8 #startup InitPPS, 85 _#define PPSToolPart 18LF24J11 Sub InitPPS // Module: ECCP1 RP14PPS = 0x000E // CCP1 > RP14 IC1PPS = 0x000E // RP14 > CCP1 (bi-directional) End Sub dir portc.3 out HPWM 1, 4, 50

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hello, I am not able to figure out how to redirect on the RC3 pin of the PIC18LF24J11 the output of CCP1 PWM... I think the following short program should give me a PWM on pin 14 (RC3), but do not get anything out of it: chip 18LF24J11,8 startup InitPPS, 85 'Set the PPS of the PWM output to pin 14, RC3 Sub InitPPS UNLOCKPPS RC3PPS = 0x0014 'CCP1 output on pin 14, RC3 LOCKPPS End Sub HPWM 1, 4, 50 Even using this version I get the same result.. UNLOCKPPS CCP1PPS = 0x0014 'CCP1 output on pin 14, RC3...

  • G. C. G. C. posted a comment on discussion Open Discussion

    With this last version of system.h it works correctly, with the preceeding one it was not. It required again the addition of the PCFG12=1 statement. Can you please clarify me if the DIR actually defines the pin to be digital, without the need of the other code line? Just to understand it for future programs with any processor I will select.. One final note: setting the 8MHz clock still needs the 3 lines IRCF0=1 IRCF1=1 IRCF2=1 the command #chip 18LF24J11, 8 is not producing the right frequency. Best,...

  • G. C. G. C. posted a comment on discussion Open Discussion

    OK, I finally understood the problem, thanks to your suggestion... I gave for grant that once in my code I put the statement " dir portb.0 in " the relative pin was defined as being a DIGITAL input by the compiler... It's not so: one has to make sure the pin it's not directed to the analog section.. To solve the problem, it has been oly necessary to add to my source this line: PCFG12=1. This defined the pin RB0/INT0 as digital, as per default (datasheet images) the uC sets it as analog. Now interrupt...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Same thing.. Timer1 works, INT0 not fired/counted..

  • G. C. G. C. posted a comment on discussion Open Discussion

    In my version (previously attached) the Timer was already working fine.. It generates the correct output on portC.3, a wave at 2Hz. But connecting Portc.3 output to pin 21 (INT0), it does not fire the EXTInt0 interrupt.. I tried also with a pushbutton, but it does'nt work either. It seems that INT0 is never enabled at all. It is expected that the rising edge of the wave should generate an int0 per second, and the cumulating sequences should be printed on the LCD.

  • G. C. G. C. posted a comment on discussion Open Discussion

    Found another problem with 18LF24J11: Can't get an external interrupt.. The little program attached here generates a 2Hz wave on portc.3, wich is connected directly to RB0/INT0 pin 21 in order to get a rising edge interrupt every second.. Then the sequence should get printed on an LCD. The output of the Timer1, sent to Portc.3 is present, but there is no way to get an INT0 fired.. What am I doing wrong? Thx and rgds, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    FYI: I set up everything correctly and now get LCD prints etc.. So I proceeded with setting Timer1 in order to give a 10mSec interrupt.. But I found that using the statement #chip 18LF24J11, 8 I do not get the right results , but a lower input freq to Timer1 clock input... I guess there is something to correct in the Timer.h file, as in the command InitTimer1 the keyword Fosc does'nt get recognized from the compiler.. If I use #chip 18LF24J11, 8 and InitTimer1 FOsc4, PS1_1 do not get the right Interrupt...

  • G. C. G. C. posted a comment on discussion Open Discussion

    It was always powered, but with the 3.3V only.. I found out that the LF models require a 2.5V supply on the VDD Core pin. Added this voltage to the pin, but still was not able to program the chip via PICKIT2 and PICKitPlus sw.. So I tried with an ICD3 and Microchip IPE, finally being able to load the hex produced by GCB onto the chip. However this little program does not work, perhaps the interface to the LCD (that works at 5V, yet another supply voltage) is not good.. I used only the 5V tolerant...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Yes, Pickit+ and Mantain Pwr at 3.3V. Attached the source/asm

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hello, I am making some tests with a PIC18LF24J11 and an LCD 16x2 with a very simple program.. I get it compiled but not transferred to the PIC. I am sure all the wiring (both power and ICSP) is correct, but the compiler tells me this: Error 3: Did not find a PIC18LF24J11. Check that you have power. Question: is there something special to do when programming the 3.3Volts devices? I am using PICKit2.. Thanks and rgds, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    Did you see my post on the typing error of the Init Timer command? I believe if you just remove the first undertscore the Compiler will create the correct code for the prescaler bits.. GC **** copied down here too, for yr reference "...... there is an error at line 106: InitTimer1( Osc, PS_1_8 )... Change it to InitTimer1(Osc, PS1_8)..... " It's only a typo error you made on the SetTimer command line.. Use my source7hex and you'll see that everything works fine. GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    I think these wrong individual bit settings are due to your syntax error in GCB source code, see the above post of mine at: "...... there is an error at line 106: InitTimer1( Osc, PS_1_8 )... Change it to InitTimer1(Osc, PS1_8)..... " It's only a typo error you made on the SetTimer command line.. Use my source7hex and you'll see that everything works fine. GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hi Awais, for what concerns the compiler error on "#option explicit", I guess is something due to the GCB's header file for yr uC, as it seems to consider a Keyword as a program variable.. I am sure Evan will look onto it and fix it. For tests purposes, leave that line commented out. For the Timer1 issue, I gave you the numbers for 4 MHz because that was the frequency you set in your first source code (the one named Test.gcb). It you run the uC at 16 Mhz, then you should change the row number 6 to...

  • G. C. G. C. modified a comment on discussion Open Discussion

    Here is a sample program that blinks two leds alternatively at 1Sec.. Tested on the simulator, if you want to try out.. Best, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    Here is a sample program that blinks two leds alternatively at 1Sec.. Tested on the simulator, if you want to try out.. Best, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    Try to change line 106 to this: InitTimer1( FOsc, PS_1_8 ) You are getting the oscillator frequency divided by 4 times using InitTimer1( Osc, PS_1_8 )... By preloading Timer1 with 15536 you have an overflow/interrupt every 50Kcycles. At 4 Mhz, 1cycle is 1uSec (because of Fosc/4), times 8 (prescaler) 8usec, times 50K cycles = overflow at 400 mS. If you use Fosc, at 4Mhz 1 cycle= 0.25uSec, times 8 = 2uSec, times 50K = 100mSec as expected.. Hope this solves yr problem.. Rgds, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    The final post on the simulator issue: it was necessary to remove the RW line management from the GCB source, as suggested by Anobium https://sourceforge.net/p/gcbasic/discussion/579125/thread/07207e7ef8/?page=2#05e7/165d/189c/ea7c/94a7/76aa/3e80/895e/cb62, and then create again the HEX file to load onto PICsimLab. If RW pin is managed in the source/hex code, even if you do not virtually connect the RW pin on the LCD simulator module trough it's property window, it does'nt work. That's true even...

  • G. C. G. C. posted a comment on discussion Open Discussion

    The simple program with only IO works, I confirm your post above. Both with RB7 and RB0. Now also with the TX serial port commands included.. I am wrong in the timing of the incoming string reception, I will fix it up by using the serial port only on Interrupt and waiting for the full reception of the incoming message. Thx, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    PS: please note that GCB source code works fine on real hardware..

  • G. C. G. C. posted a comment on discussion Open Discussion

    Yes, I am sure I configured the right pins of the LCD in PICSimLab according to my source code.. You can verify it too, as I included the workspace file of PICSimLab, that includes the connections I made. But it does not work to me.. Did you try to load my workspace file and see if it runs on your machine? If positive, it would be clear that I have an issue with PICSimLab installation on my PC.. Thx and rgds, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    Sorry Anobium, But I do not understand you point.. In my example, that I have fully working onto a breadboard as it is posted in the main.gcb above, there is simply this strange fact: it works if I put the red LED on RB7, and not if the LED is connected to RB0 (obviously changing the sw to the change of output pin).. Leaving aside the Serial lines commands, there is only an LED (yellow, RA6) that blinks once per loop that includes a 1s delay, and a pushbutton that if pressed (active low) will invert...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Perhaps there is a misunderstanding due to my poor english.. I said I made some tests with the red LED attached to RB0 and was not able to toggle the LED via the pushbutton (active low, a 10KOhm resistor on RB4 to pull up to 5V and a pushbutton to get a low when pressed ). Meaning that the code line that now in mmy source code above is written as dir portb.7 out // Red Led was initially set to dir portb.0 out // Red Led and the other one: #define pb_led_commute portb.7 = !portb.7 was before #define...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Also mine is on a real hw... But I get it on an output, not input.. see my source code I put above, and if you can, try it out pls.. I had to change the output to pin RB7 to make it work. When Led is on RB0/INT0, pb_led_commute (portb.0 = !portb.0) command does'nt get executed.

  • G. C. G. C. posted a comment on discussion Open Discussion

    Made modification to h files, now it works correctly.. I found another "bizarre" problem on the PIC18F1220: when I use the pin INT0 to connect an LED I can't toggle it.. Moved to anothe pinj it works.

  • G. C. G. C. posted a comment on discussion Open Discussion

    I cannot make it work.. Would you mind to get a look and give a try to this simple example and tell me if it works for you? Perhaps something is wrong with my installation.. By the way I tested this morning the latest release of PicSimLba, Nov. 12, and still it does'nt print anything on the LCD module. Thx, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    I believe it was a combination of multiple issues.. Both Hardware and Software. Perhaps I started overconfident in my previous experience with simple PIC boards (made up with MPLAB, C and ICD3), and the easyness of Basic added to this. Misfortune was also in using "defective" chips (the PIC18F1220 that you should have received), and also I did not make enough checks to every wire on the breadboard and got problems at various points, like the LCD etc. Furthermore, some confusion arose because of the...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Yes, Carriage Return and Line Feed too..

  • G. C. G. C. posted a comment on discussion Open Discussion

    One more question... Now I finally got the program working, sending and receiving small strings to/fm the PC Terminal.. Attached the code. But the program hangs up at the instruction HSerGetString uart_input if I do not precede it with the command if USARTHasData Then HSerGetString uart_input end if If nothing arrives to the UART, the program flows continuosly.. But at the first string received, then it will hang up again at the line HSerGetString uart_input . It seems that when using this instruction,...

  • G. C. G. C. posted a comment on discussion Open Discussion

    It seems that I am not lucky at all with the tools for GCB.. Here the latest news: 1) PicSimLab keeps not working.. I made several trials, but there is no way to make it work.. While my program on the breadboard works fine....! It's impossible to get infos on their spare parts like the LCD for example - it should work in the 4wires mode, but you can't be assured on their doc 2) I received yesterday the TTL to USB adapters I ordered, made a cable to swap them all alternatively onto PC/breadboard,...

  • G. C. G. C. posted a comment on discussion Open Discussion

    @Chris Hi Chris, I made some progresses with both GCB and Picsimlab.. Put down simple progs that turned on and off LEDs and they worked also on PicSimLab. But as soon as I try something more complex, I find problems. In the attached GCB there is a program that works perfectly on a breadboard, printing data on an LCD and blinking an LED, reads a pushbutton to toggle another LED.. Also, it loopbacks a character on the Uart (TX/RX shorted). When I try to simulate it on PicSimLab it does'nt work anymore.....

  • G. C. G. C. posted a comment on discussion Open Discussion

    here what I get

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hi Chris, done wgat you suggested, and have to admit is seems simple.. However I was''nt able to see any output on the terminal, after having loaded the Transmitter Hex and launched debug, I saw on the virtual scope that the uC is sending data to the terminal (virtually cross connected com3/4). But on the Terminal console does'nt appear any string.. I haven't read the doc yet, so will find out what happens... But it's just for getting familiar with PICSimLab too, as in this case perhaps the sw emulation...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hi Everybody, thanks to all whom had the patience to look at my issue.. I think I solved the problem: PIC18F1220 have troubles (among other things) with the UART.. To prove it myself, after I tought of this yesterday and this morning found the errata sheets, I made a rewire of the Receiver uC using this time a PIC16F886 and keeping the Trasmitter uC with PIC18F1220 with the same short program.. Found that as I tought the 18F1220 in transmission "almost" works, like the oscilloscope was telling me.....

  • G. C. G. C. posted a comment on discussion Open Discussion

    Yes Mike, As i said in a previous message, got that input early fm Evan.. I already ordered the TTL/ USB converters (three models, CH340, PL2303 and CP2102, just to be sure one of them will work). But they will be delivered to me with other stuff around mid November.. While waiting I got the idea of the "Poor Man's Terminal".. Thanks and rgds, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hi Evan, I told you that the 47k resistor is not influent in the problem.. Yesterda, in the n tentatives I made I also removed that one, with same results. If you notice it, I had one placed also at the receiver pin on the uC (receiver) that drives the LCD. The first tests with or without it weremade to make sure that the edges of the tx/Rx were fast enough. Such an high value can't make any different in the output stage of a CMOS device, I am sure. This afternoon wil make some more tests and let...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hi Mike, thanks for the time devoted to my issue.. Now I suspect even more that (lucky me) those 5 pieces of 18F1220 I had in a drawer have problems.. Found these errata sheets where it mentions that, among other things, the uC may have clock problems that influence the UART too (autobaud rate etc). https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/Errata/80175e.pdf https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/Errata/80324b.pdf My...

  • G. C. G. C. posted a comment on discussion Open Discussion

    I will.. it's a 47k, ininfluent on sw. I tried to pull up a bit the pin to vcc (the stand by status is a logical one) for getting better edges on the output stream.. But it won't change anything.

  • G. C. G. C. posted a comment on discussion Open Discussion

    Thanks Chris, all of the good things you said about the simulator convinced me to get a look to it, will be useful also for future needs.. I hate to have to learn yet another complex tool, however, Instead of simplifying my firmware life with GCB as I initially tought, it seems I have to "sweat" on learning other additional stuff. Sometimes the learning curves of yet another sw makes you think to give up.. Between Spice/ PCB Cad / Compilers etc, if you do it for hobby, you get tempted many times...

  • G. C. G. C. posted a comment on discussion Open Discussion

    As i said above, pin 9 and 10 are connected, verified with a tester.. do not get wrong by perspective angle of the picture. count the holes on the breadboard and you will see the green jumper is connected correctly. tomorrow i will try another uc, i have another couple of them, and eventually rewire with a newer model bye, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    I tried yr HEX file, but it behaves exactly as mine... Does'nt work. I commented the DELAY OFF line and loaded yr HEX, recontrolling again the connection between pin 9 (b1, TX) and 10 (b4, RX). I checked with an ohmmeter if the jumper was internally open.. But it's ok. It's difficult to make HW errors with such small setup (see picture), but don't worry to ask - sometimes it's someting really simple that prevents the board to work regularly. So I start to believe that perhaps the 18F1220 has some...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Thanks for your suggestions, Ccin E Crout, However you are using a software serial transmission, wich does'nt apply here.. I am struggling with the USART peripheral, wich is expected to take care of most of the work by itself and not requiring a special SW.. You have to take care of start bit/ parity etc. This should be done entirely by the usart module. Thanks for your input anyway, I'll think about it if I have to make some serial transmission like IR remotes etc in a similar way, perhaps. Bye,...

  • G. C. G. C. posted a comment on discussion Open Discussion

    This one attached here is the last of many trials I have made.. none working.. Very frustrating.. I tried all the RS232 HW commands, strings or single characters, but none is working. I can't believe the chip is faulty, I see the data transmitted oon the scope. There are problems with the receiving commands or I miss some header file or what ?!? Rgds, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    The listing

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hello Chris, I tried the simplest code I would think of, but still have not been able to make it work.. I just have connected power supply, an led on pin 18 via a limiting resistor, and shorted pins 9(tx) with 10(rx).. Then sent a char, wait 10 msec and read the rx... If it was the same data trasmitted, I would have pulsed the LED. But I am unable to make it work, not even such simple stuff.. :( Can you direct me to a working example I could look at? Thx, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hi Mike, Seeing yr input I tried to delay more the transmissions (now 10 secs fm each other), either with HSerPrintStringCRLF and a whole string, or using HSerPrint with a single character followed by HSerPrint of a CR, but the result is the same... Does'nt work. Tried the same receiver code with HSerGetString, but despite the much slower transmission it does not work. Then I changed the receiver to get a single char with HSerReceive, and in this case I get one time only a zero printed (it should...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Thanks Chris/Anobium.. I'll try out the things both of you suggest.. But let me clarify that I was just getting confident with GCB and trying some of the LCD's routines and it was quite simple to get characters on the display (the worst problem was to adjust the contrast). This is'nt a project, but only a way for me to learn to use GCB. In another attempt on another board with LED matrixes Anobium supported me as I understood the way to debug line by line the code I was used to with MPLAB/XC8/ICD3...

  • G. C. G. C. posted a comment on discussion Open Discussion

    thanks Mike, But as I said above, after the suggestion fm Anobium, I already added the #USART_BLOCKING statement.. and also added the "If USARTHasData Then" command, that is not documented anywhere (at least I was not able to find it). Apart fm the #USART_BLOCKING define, my receiving algoritm was essentially the one of the help file.. On the 2nd UC, transmitter side, I used the HSerPrintStringCRLF command, so in the received string there should be present also a Carriage Return / Line feed block...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Ok, I added the #USART_BLOCKING and then put a check on the If USARTHasData Then as follows: If USARTHasData Then HSerGetString usart_input end if But still get no input from the Usart... I would like to read a string at a time, not a single character. I used the same listing as the example in the help file (for the HSerGetString command), but it does'nt work. The problem is surely onto the HSerGetString command, as removing it the rest of the flow is correct... Regarding the demos, are you referring...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hi, This time I am trying to play with LCDs and serial ports.. I connected two PIC18F1220 in such a way that one sends continuosly a couple of strings to the serial port, put a wire fm it's TX line and the RX of the second one that should receive and print on a 16x2 LCD module those two strings.. The LCD module and all trials of prints etc works fine, but if I put the command HSerGetString to read fm uart I am not able to get anything.. The transmitter should be working fine, I see the stream of...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Thanks for the macro explaination, and seen the video.. However this time I will not follow your advice - that would mean to get back to MPLAB and Assembler debugging.. see my "philosopical " comment above". It's like for a woodworker with power tools that wants to move to CNC's and laser cutters etc, but instead has to go back to handsaw and hand drill.. No way. As a joke, that would mean that instead of moving to GCBasic, one goes back to basics..! I left assembler at the times of 8080/85 and HP64000,...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Really interesting... I am learning a lot (even if rather slowly).. First, I cleared the point about interrupt enables etc.. Using On interrupt (as described in the help) enables the specific peripheral interrupt. Second, I do not need to clear the int flag (not specified in the help, but being not present in the examples, one should get it). I checked with the scope the RA3 pin and it shows the expected 0.5 Hz.. Therefore, I told myself, the Int fires correctly.. But then, without your suggestion...

  • G. C. G. C. posted a comment on discussion Open Discussion

    The timer is expected to overflow every 10 mSec.. (do not look at the comments, I started with the idea of 1mSec, but then increased to 10mSec). At 8 Mhz, 125 nSec period x 4 (Fosc/4), the timer input clock period is set at 0.5 uSecs. So, to obtain a 10 mSec overflow it needs to count 20K pluses. As the Timer1 is a 16 bit counter, it will overflow at 65536 counts, therefore to count 20K pulse I preload it with the number 45536. if it fired the interrupt , then I expected it to continue to show min/secs...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Sorry to bother again.. Now I am struggling with the Interrupt.. I used more or less the same instructions present on the On Interrupt help example1, but get no interrupt.. Questions: 1) after having used On Interrupt Timer1Overflow call xxxx, shall I enable the Timer1 interrupt? Reading the help, it seems GCB will take care of this without need to use TMR1IE=1 2) Once in handler (when it will get started!) shall I clear the Timer1 flag TMR1IF=0 ? Or GCB does it automatically? 3) After having enabled...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Ok, editing the Timer header file fixes it.. Thx Also the "two lines" concatenations work, thx. But In order to avoid to make the same (maybe annoying for you) question in the future, what's the rule about wich uC works with multiple concatenations etc and wich one do not? I plan to move to newer, larger memory chips and bought some PIC18F27K42 and also some PIC24.. (Want to get hands on with bigger displays and the great Graphic Libs of GCB).. I guess on these there is no problem (hopefully).. But...

  • G. C. G. C. posted a comment on discussion Open Discussion

    It's the PIC16F886.. Thanks for yr support. What about the Timer issue?

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hello, I found a strange behavoiur of the compiler when trying to make a string concatenation with more than a number to string conversion (Str) on the same code line.. is it something known and it's not possible to be done? dim orario as string dim minuti as byte dim secondi as byte minuti = 10 secondi = 40 I mean that if i make this statement: orario = Str(minuti) + ":" + Str(secondi) I get an error "Cannot handle variable construct. Please check syntax, simplify source or check use of variable...

  • G. C. G. C. posted a comment on discussion Open Discussion

    I understand the need for support of the project, and I will not wait for christmas time... :) About one way to contribute, that is in purchasing a PICKIT2, I will write you a separate email at yr website, as I do not think for commercial stuff this is the correct platform to use, right? I will watch your youtube channel, surely will find some good advice. About going line by line for debugging what I really meant is that if I could stop the program running on a real board, with interrupt coming...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hi Anobium, I did not say that there was'nt any doc on the MAX72library, either on the Help of the IDE nor I was able to find online a "guide" on how to use the commands... That is because I don't pretend to get everything well documented and precisely explained as for a commercial product. I am grateful of the availability of GCB even if it's not "state of the art" yet. And I did not want to press out or demotivate the Developer's team with such claims.. But if you "like" to have some feedback on...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Ok, I made a few tests and can confirm that the key is to refresh the buffer.. The print works with both commands (GLCD or MAX_GLCDPRint), and it's not a problem to pass a costant string or a variable with the text to show. ex1: Max7219_LEDMatrix_GLCDPrint(0, 0, "12:54") Max7219_LEDMatrix_Update ex2: dim testo as String testo = "pippo" Max7219_LEDMatrix_GLCDPrint(0, 0, testo) Max7219_LEDMatrix_Update Both these work.. But the Max7219_LEDMatrix_Update is mandatory, or the display wil stay blank. Rgds,...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Yes, it works... It shows only the first 5 characters, but that's the limitation of the 32x8 display, of course. So after any write to the display it's necessary a "refresh" for the display, that is made by the Max7219_LEDMatrix_Update sub that resends the display buffer, I guess.. The "scroll" sub probably calls directly the update, as it does not need the explicit call. Thanks. GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    Here it is, attached here... comments etc are in italian, but I guess the few instructions used at present are so simple to understand.. Abut using the terminal to debug, honestly I do not know how to do it, as for my boards developments in the past I always used Mplab with XC8 and the ICD3, placing breakpoints here and there to look at the watch window the variables contents. If you have some stuff to read about how to use the terminal, I'llbe more than happy to learn it out. I am much more familiar...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hi there, I am trying to emulate a watch on 4 8x8 LEd matrix modules.. But I am not able to print a single string in a "permanent" way (better: to be changed only once per minute) on the display.. Searching into the library I saw this command: Max7219_LEDMatrix_GLCDPrint , but when I try to use it in this simple way: Max7219_LEDMatrix_GLCDPrint(0, 0, "12:54"), I do not get anything on the matrixes. Please note that if I send a scrolling message with Max7219_LEDMatrix_ScrollMessage ( "my msg",1) everything...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Great, this time you nailed it..!!! It works, this is the output once i simply edited the command parameters in the preferences: Downloading program ...MPLAB-IPE ICD3 CLI for PIC using external power Calling : C:\Program Files\Microchip\MPLABX\v6.15\mplab_platform\mplab_ipe\ipecmd.exe Parameters : -TPICD3 -P16F886 -M -F"C:\Users\GC\Documents\Matrix\GCB Project\main.hex" -OL DFP Version Used : PIC16Fxxx_DFP,1.4.149,Microchip Connecting to MPLAB ICD 3... Currently loaded firmware on ICD 3 Firmware...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Thisi is what the Pro Editor and preferences in the tool tab look like

  • G. C. G. C. posted a comment on discussion Open Discussion

    I have done as you said, removed the section tool = mplab_ipe64, and copied/pasted and saved into the USE.INI file this one: [tool = mplab_ipe_ICD3_use_ext_power] desc = MPLAB-IPE ICD3 CLI for PIC using external power type = programmer useif = progconfig = command = %mplabxipedirectory%\ipecmd.exe params = -TICD3 -P%chipmodel% -M -F"%filename%" -OL workingdir = %mplabxipedirectory%\ipecmd.exe Then relaunched GCB, tried Hex&Flash, this time got this output: Downloading program ...MPLAB-IPE ICD3 CLI...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Now I tried this:in the Programmer Editor, after having changed the directory in the tool variables to the correct one, C:\Program Files\Microchip\MPLABX\v6.15\mplab_platform\mplab_ipe : File: %mplabxipedirectory%\ipecmd.exe Command line parameters: %mplabxipedirectory%\ipecmd.exe -TICD3 -P%chipmodel% -F" %filename%" -M -E -OL Working directory: %mplabxipedirectory% and got the following terminal output, but not the previous error message of file not found (this time is the programmer and Hex file...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Thanks for yr kind support.. I removed the space in TICD3, used %mplabxipedirectory%\ipecmd.exe, and checked the and changed the mplabxipedirectory (wich was wroong, see the picture attached). But the error is still there. I am attaching you the USE.INI file too. GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    Here are some details: MPLAB IPE directory: C:\Program Files\Microchip\MPLABX\v6.15\mplab_platform\mplab_ipe this contains icd3cmd.exe, ipecmd.exe, pk3cmd.exe files etc.. Directory of the mplab_ipe64.exe file: C:\Program Files\Microchip\MPLABX\v6.15\mplab_platform\bin Attached pictures of the error msg and programmers parameters. Rgds, GC!

  • G. C. G. C. posted a comment on discussion Open Discussion

    Thank Anobium!! 1) Just swapping the DI/DO pins definition solved the problem, as you said. I was confused thinking that Max7219_DO was an attribute of the driver chip, and not of the uC. I should have got right when the compiler required assignment od DO pin,wich is of course absolutely necessary. And now removing the "DI" line creates no warning/error.. 2) I saw the pickkits, lot of choices and thinking to wich one to order.. Just an assurance: yr pickit 2 works also with the recent PIC, right...

  • G. C. G. C. posted a comment on discussion Open Discussion

    Yes Mike, I saw the potential of this chip in conjuction with GCBasic.. and there are plenty of additional graphic devices/displays supported with libraries that simplify the firmware creation.. I am sure I'll have some fun with GCB in the future. Bye, GC

  • G. C. G. C. posted a comment on discussion Open Discussion

    Hi there, I just joined the forum.. Saw by serendipity in the past days this amazing compiler for PICs (let me tell you immediately that it's a really great initiative and the developers team deserves a BIG thank you for sharing their knowledge). Just after installing and tried successfully simple I/Os programs, I am trying something more complex . Reading the examples of use of the MAX7219 lib it seems possible to use generic pins of any uC for sending commands to the matrix modules, can you confirm...

1