Hello everybody.
I am starting on a new project and was thinking of starting with a 16 bit pic.
I was searching a bit which pic is the best choice. The clear first choice is chosing a family....
Type: Posts; User: amateurtje
Hello everybody.
I am starting on a new project and was thinking of starting with a 16 bit pic.
I was searching a bit which pic is the best choice. The clear first choice is chosing a family....
Hi Les. I was making my code smaller and smaller to send to you.In the meantime i got a new PC and on this pc, it is working, even with the newest compiler. I really am clueless.
So now I have a...
I am glad you try to help! and you may have mine...I really hate them but getting older is not always fun......:)
Hi Johan,
This script runs, and runs already a while. Only it hass become bigger and bigger. While my other items that the interrupt is doing, is very important to never miss a pulse or timing...
In the meantime I received my 40Mhz crystals and I installed them. As expected, only these crystals did not solve the problem. Completely logical ofcourse, but it is a good step.
While I do not...
Hello Les, I will try to make it as small as possible but I have to make it for another print. I have another pcb with a "normal" display attached. The only thing that was in the code is the...
As I wrote, I fully agree that if there is a new compiler with new possibilities, there is a small fee attached...
Next to that, isn't a good idea to have a kind of support credit sturcture or...
Hi Les, that is the problem. The code is not working in the new compiler version and therefore I need to use the newest compiler for 1 program, and the old compiler for the code I sent you... mainly...
Hi Les, can you confirm you have received the email please ?
Just send you 2 emails, 1 with attachment and 1 without.... Zipped the script now.. :) Thanks... already.
Hi Towlerg,
As I wrote, indeed, I think it would be better to do less in the low priority, but still, in theory, the problem remains, even when doing very little in the low prio interrupt. only...
Sorry, i can not edit my post anymore... another thought I had reading your (Les) his comments on other related posts. There is written that you have to reset an interrupt flag at the end of its...
but will this not cause a problem, using for both Context save and context restore?
I thought/hoped/suspected that the problem of blocking sometimes when there is serial communication while pulses...
Hello all,
Because my interrupt cycle was getting bigger and bigger and a stopwatch and pulse counting has a very high priority over the serial communication, I divided the interrupt in a high...
Hi Les,
As said before, you should indeed charge something. I am using with great pleasure your software and I think it is good for everybody that the software has a great future.
PS, did...
Now, I run into the next problem and it seems to be related. Therefore I do not know if I should open a new topic.
The problem:
I soldered the 2 capacitors for the 20Mhz crystal to the board.
I...
And the hair is getting less and less by the day..... I thought that was from getting older but it might have something to do with programming as well..
But still, the satisfaction you get when a...
Hi John,
THanks, I got it!!!!!!!!!!
You brought me on the right track. I soldered a 10k resistor to the vdd and MCLRE which did not make any difference.
Then I, Seeing your description, I...
I am sorry. I did not want to be difficult.I really need help :). if it will help, ofcourse I can make the schematic of the current board.
I hope it gives some new ideas. I soldered the crystal...
I have now a pcb, 12 volts dc to the power supply (traco 1-2450) --> elco 1000uF and 100nF to pic.
3 leds attached to 3 ports.
Thats the complete connected schematic.
The led blinks 2 times,...
The diode is only to seperate the 5Volt part where some sensors and displays are attached from the 5Volt of the PIC..
This will be killed in my next test with the empty pcb..
I will see if I can connect a 100nF to the other Vdd. Yes, they are both connected to Vdd.
I also thought about the watchdog, but do not know how to shut it of "more"...
I'll be back soon with...
yes, the 1000uF is in the Vdd lne of the PIC... This setup has always worked for all my PIC PCB's in the past. just to be sure that if there is any fluctuation in the 5Volt circuit, the Vdd of the...
I can include a shematic but I am afraid that, while there is a lot things attached that have nothing to do with the core of the problem wihle the programm is also "empty", it will only blurr the...
I have a 1000uF in the power supply line (after a diode) to keep the pic stabalised. Besides that, there is (only) 1 100nF in the neighbourhood of the PIC.
Woudl that explain a restart after...
I see that I have made a (little bit stupid) mistake...
The old PIC was a 18F46k22 (TQFP 44) and the new pic the 18F47k40 (TQFP 44).. I understnad it is not a direct replacement but on the board...
Thanks for the input.
It is not the 18F27k42 but the 18F47k40...
I have used the configurator of proton for the fuse settings and even used the fuse settings of scripts that I found on this...
thanks for the reply.
This PCB is doing well for long time with this Relay withthe 18F46k22. Also the short on and off bursts (for about a second) he does well...I have other ports enough so that is...
Hello,
On an existing CPB, I have replaced the 18F47k22 with a 18F47k40. Now, i am stuck for a while, while it keeps restarting.
The PCB has a relay on PortC.0 which I can hear ticking. I...
I know it is an old thread and I searched the complete site (I think) but I do not get it to work. I can not find the file two_dim_array.inc anwywhere. also the wiki example code gives me...
anybody ever done something with Car OBD (directly or indurectly) into a PIC?
This is good to hear. I will first make the transition to the 18F47k40 to make my life easy and when everything is in place, I will transfer to the Q-series.
I can imagine that all the work is...
I did not realise it is soo different but I am beginning to understnd that... That is for sure not what I am looking for at this moment :)
I have to look further for my ideal pic.....
thanks...
thanks for the info.
tht would be difficult because I am a bit loking for an almost drop-in solution.
The memory was not the only reason, although I still have good ideas to integate and I am...
Hello,
I am currently looking to get a 18F47Q84 as a replacement for my 18F46k22, while I am running out of program space. It looks a very interesting replacement but is very new.. so new, it is...
Hello,
My ultimate goal is to bring some information via a GPRS unit to a website. I was thinking about a unit like this or something simular.
I could imagine the data being in a textfile, xml...
Hello,
I need to change a Dword into a float with a lot of decimals behind the comma. Already, when making the dword into the float (before the devision to make it a decimal number) it goes wrong....
I was re-reading my post and this sounded very negative (I am dutch but that was probably already clear). Anybody must be (of course) everybody...
Thanks for the help. In the meantime I used a little bit different methode. The ADC methode also costs me a pin and I am trying to safe them as much as possible while I do not have a lot of them...
Hi Alberto,
I do not understand what I do wrong. It took some time to get it to work but still I do get every run the same number...
is it maybe a possibility to use the internal frquency calibration? Is that an address? or is there somewhere an address with a serial number or manufacturing number of some sort?
Hi Hadv,
Thanks. I took a look and started to try to re-write but it is, for somebody who never worked with these proc and result types, a bit difficult to rewrite. maybe it is easier as Stephen...
Hello,
I need to store only once, at the programming stage, a random number Via the Edata in the EEPROM. It needs to be a 4 digit number. So I used this code completely at the beginning of my...
hello,
I have here a fine workig code and when the device comes from the standby mode it uses the CLEAR command to clear everything and start fresh... this works nicely.
NOw I have the idea to...
sorry, can not edit my message anymore, but something like this but for picbasic; http://woodsgood.ca/projects/2015/02/17/big-font-lcd-characters/
Maybe I am not seeing it but you guys are talking about how to print something on the screen, correct?
But is in your scripts the possibility to print big numbers? (two lines displaying 1 big...
Hi Alberto,
Thanks fro helping me. Actually I can not find it very well. Can you point me in the right direction? Is it in the Hitachi file or the 7036 file? Adn can you tell me in which bas file?...
Hello,
I have here a 4x20 HD44780 Charaketer display and I see examples of people having displayed big numbers with combining 2 rows and making glyphs ( I do not know this is an official word). I...
In the meantime I have found a solution for my problem through another forum. With a bigger pause between the serout commands (a delay in the program) the problem is gone. However, it is still...
Hello,
I use the ccp1 and ccp2 module to count pulses and I want to send serial data over the first USART bus on a 18F46k22. When the CCP1CON or the CCP2CON are activated (000101: detect Falling...
I did the same...!!!!!
Declare CCP2_Pin = PORTC.1 ' Choose the pin used by the CCP2 peripheral
Worked for me as a charme... Strange that there is a difference in versions and that the...
Sorry, soo much to do.. I will try to dive into this
again this weekend. I think I never declared the ccp2 niether. But for some reason
, it is working with my old version... I will write back...
Hi Charlie,
As expected, changing end if into endif did not help. Istill tested it to be 100% sure. As stated, the complete program works, even when I compile it with my new pc except the motor...
Hi Joesaliba,
Thanks for replying. However I do notknow what a code snippet will add to this because it just an HPWM statment used. But, ofcourse, I made one. I will do almost anything while...
Hello,
I have a problem with a script for a 18F46k22. When compiling on my old pc it works fine (I need to use my key). When compiling on my new pc, the program works but the HPWM part does not...
Hi All, Solved!!
I was indded the OERR and FERR. Now Iresetted them in the interrupt, it works.
Athough displying them they still would not be set and stay 0, when still resetting them in the...
thanks for the reaction and thoughts.
Oke, so that is not a bug or wrong code or wrong setting. it is supposed to work that way.
I thought the same but this is minimised code. in the...
I do not know exactly what you men with handshaking. I just declared it in the top and the ewrites do not stop my interrupt anymore. However, the GIE I may not stop and start...
In the meantime I can also say that it is because the transmission is stopped or influenced. I measured with a scope and there is no change on the data line when the program is stopped.
I still do...
I am sorry to reply to my own message but I can not edit anymore. It still runs when the complete TMR1 section is out. The definition and the tmr1IF section in the interrupt. Therefore it does go...
Thanks for the replies. I have been looking at the sren and cren bit but can not see anything strange with it. however, I am pretty convinced it must have something to do with the definitions because...
Helo,
I have a strange issue and I am struggling for days now. Iam receiving GPS data into an existing program. One of the issues I already ound is that when Istop the GIE and start it again, the...
The code I posted before just worked fine. If you need help in translating some words (I used some dutch words, also for variables) then let me know. It is maybe not the most efficient way in amount...
hi,
That, I understand.thanks. I did not do that. It is very high at the top of my program but was not jumped over.
My machine left today and maybe on Monday I will have a possibility to try...
I do not get exactly what you mean George but in this case there is no code in the include. Only Cdata statements with all text strings.
I have 1 file with the english language and a file with the...
Hi Les,
Thanks for your anwer.
By reducing a couple of CData statements, I got problems in other area's, at different I\O Ports. Today I have deleted all Cdata statements (that are in a INC...
It seems that this issue isrelated to my other problem/question. When I start cancelling some Cdata information, it all starts functioning again.
So, for further information (and hopefully...
Hello,
I have a big problem which I do not seem to be able to solve but I need this thing t be working by tomorrow. I hopsomebody can help. I use a 18F46k22 and the script untill now was...
Hi Les,
Thanks for your reply. I will send you asap a piece of code snippet. I will reduce the code as much as possible. At the moment it is a madhouse here trying to get som tuff done. For te...
Hello,
To have Multi language possibility I included cdata calls in my project in an include file.
Since some recet additions my program got stuck somewhere halfway. I traced it back to a...
Hi Hadv,
I acknowledge that every language/compiler has its pro's and con's. And I think that picbasic is great and I am loving it. I love programming in basic. First of all, it was just a honest...
I still think it is strange because you could imagine that the program just puts text on the place like it does with symbols. I understand that tekst is a byte per karakter (from the ascii table) but...
Hi Hadv,
Thanks for the answer. I thought so that there wasn't a better way. The separate include file is a good idea. I tihnk it is strange that something that should not cost extra memory (the...
Hello,
i would like to make a section where I can adjust some text to make the same application easily in another language. I tried to store text in a symbol but this does not work. I think it can...
sorry to bump but @Dans, is it possible to share your findings?
hi all and especially Peter,
I have exactly the same wish to do in the near future... could anybody help me with maybe some example code?
greetings
thanks for all the help. I am sorry but i was drawing the wrong conclusions. I could not store a collection of variables and another variable which were above adress 255.... after les's post I...
Ik
now
is an old
thread and the issue
should be resolved. However, I use the 18F26k22 and I do not seem to be able to store anything above eeprom address 255.
I have compiler 3.5.8.4...
I have tried TMR1, TMR1L and TMR1H but nothing is working. It is not about the 8 bit or 16 bit timer.Noe of these TMR1 options is put into the Tijd variable.
Reading the pic manual part; all the...
As I want to measure the time (timer pulses) between two counts of the TMR0 Counter, I want to give the variable "Tijd" the value of the TMR1 at the moment of the TMR0 INterrupt.
I want to do this...
I use a 16F1847 with TMR0 (puls counter) and tmr1 (16-bit timer) as a stopwatch.
Now I also want to measure the time between two pulses. In this I want to load the value of tmr1 onto the variable...
I realise it is a long time ago but this is a very interesting thread for somebody who wants to work with I2C, Pic-to-Pic. (and is not soo experienced)
@Dans, You never came about posting your...
Is this a question or a remark?
If it is a question, then my answer is: I have never seen that.... If there is, it might be simple to re-write it to hbusin/hbusout... Would be even better...
Hello All,
I am trying to understand this code but I am stuck.
I can also not find another example for a I2C slave.
The master uses the code:
HBusOut %00000010, [waarde]
The next section...
Hi George,
Thank you. How logical.
I have the fuse configurator installed on my laptop but got too focussed on the Config4L byte insterad of the fuse like this..
thanks... (sometimes you get...
Hello,
I am using the 18F4455.
This is my configuration.
Config_Start
PLLDIV = 1 ;No prescale (4 MHz oscillator input drives PLL directly)
CPUDIV = OSC1_PLL2 ;[Primary Oscillator...
Ok, thanks for the info.
Unfortunatly I am going to have a busy weekend and week with some other developments that need to be finished. After that, I am going to look into this again and will come...
It is not too late to change. The
distances are around 1,5 meter (5 feet) while a cockpit
needs to be connected to other pics. However, IC2 is with master slave relationship? I can have two...
yes, just two pics connected to eachother. Rx to Tx ...
In the end I would like to use 1 bus where around 10 pics are communicating with eachother...
I tried some pull up or pull down resistors...
Why it would hang up / why the pic stays active through a current on the serial port and what I can do about that..
EDIT (sorry, 20 minutes were over):
It seems that the display is disturbed. I could see on another device that is attached that the pic is running. Furthermore, the pic is not stopped, so the serial...
Hello,
I ma using a 18FPIC26k22 and a 16F648 is sending serial communication to this pic. I am using the second hardware port of the 18F26k22.
With the serial bus connected the PIC hangs when...
yes, I made Xtal = 64 (second time, forgot it first indeed). That did not help.
There are no osccon settings, are there? Am I now confused with other pics?
update:
when using my multimeter to get the frequnecy I see something like 0,5 khz on the port when it works (when driven by Rb1). and I get 10 times more 5,x khz) when port B0 drives it. does this...
Hi Charlie,
I am going to try that. Just found out something new after the complete day trying already. It works on all other pins of port B except on B0.
I do not know if this output is...
Hi Charlie,
Thanks for the reaction.
It is an external 20mhz crystal. There is actually a stopwatch in the Original program and this runs normal.
It is the same board as the 18F2520 runs on...
Hello,
I have made a program with a serout command on B0.
This program is exactly the same as on a 18F2520 but I need also 2 hardware comunication ports. Therefore I transferred to the 18F26K22....
Hello All,
I have tried to load the code of the project (controlling 8 leds with USB) into my 18F4455 which is written for a 18F2455. Ofcourse I changed the device name in picbasic and I compiled....
hello,
I have different values which should be saved with EDATA.This will be around 100 sets.
For example:
Var1=4 4 4 5 5 4 ...
Hi guys,I am a proton picbasic guy but I needed a done I/o board so I bought this arduino board... Ifyou are no a c# or something guy, it is not very nice...... (friendly said).
Ishould havethought...
sorry, did not know what it was and how that worked. I hope i did it correct (after clicking it became red as a thumbs down) but probably that meant you can click another time for thumbs down...
I...
Thanks a lot!
I had some troubles with the other end of the serial communication and therefore I could not test it. I have added the Xtal and now it works. I thought that the default of the 648...
Hi Normnet,
I iam going to try that this evening and let you know. Thanks a lot for the help. I had to add an xtal statement in antoher program to but never made the link. This is already an older...
I have added in a lot of prograams the declare statement and I remember that I have changed some othe rstuff too. I believe certain variable names that could not be used anymore. But anyway, those...
Hello,
I have a project which drives some 7-segment led displays from a serial signal.
The problem:
If I compile exactly the same .bas file on my old computer then the program works
If I...
hi Automods. Thanks for your reaction. Which calculations do you mean?
To start very simple, to just let it run idle, (Thinking about splitting into 2 pics for the moment), I need a pic that gives...
True, but I am not going to test on my own engine. I should have an old one lying around somewhere and want to do it with a teacher at a school for mechanics. However, I am the one knowing something...
Now I get it and a lot becomes clear to me! I always knew there must be a program running based on the values and with the chiptuning etc they always only replace the eprom with data.! So, I should...
I think thats true ( what I could find about it )but if I get the legs to line up, I should be able to configure the I/O's to match the different items it is connected t? Or do I miss something??...
I am thinking about making my own Motor Management system (ECU) with a PIC for a gasoline engine. Has anybody ever done this? Does anybody have maybe already an example to get me going or special...
Hello Kim,
Stay with the beloved PIC!!. Sometimes it is a challenge to find something (I am aa bit of a novice amateur programmer myself so I am searching all the time for snippets or examples)....
@ Harm,
I cleared the TOIE bit and not the TOIF While my purpose was not surpressing he interrupt from happenning (If I do that, 256 pulses would be lost) but I just wanted to shut it down for the...
hi Harm. thanks.
The counter does not interrupt at every count. he only interrrupts when he reaches 256. Thats why the statement is ovrflowvar = overflowvar +256. And this is added to the value of...
Actually I have a bit bigger Interrrupt while there is also a timer running for a stopwatch. This I will leave out of this discussion while that makes it only more complex..
What I have working...
hi hadv215
I can imagine the benefits of a 16 bits timer. I did not know that existed. I work with a 16F648A and will change over to a 16F1847. I actually work with a timer and a counter. (and...
Hello John and Stephen,
Thanks a lot for your inputand interest. I realise, reading your replies, that I did not explain myself very well. When having a problem it is always difficult to explain...
the temp is the counter of the interrupts. It is actually called overflowvar in my program. This is even a dword while I need to count a lot of pulses. So every time the interrupt is activated, the...
Hello All,
I have a Interrupt timer running that is counting up. In the Interrupt Sub Routine he counts another variable up (Temp = Temp + 256) so that TMR0+Temp is my total count.
Now I want my...
I am also trying to put big characters on my 240x64 GLCD and Dave S his code works perfect. my complements. there are people talking about contributing (to have the icon crunsher??) but they did not...
I did it with a 32Mhz internal clock with a 18F2520 and it works with the neopixelring:
So it canbe done with 32 Mhz and it even forgives some code inbetween (and the internal clock..).
...
Nobody wondered where this is coming from?? Is this true and what is the code?? Please Matt79, can you tell us?
What do you mean with your second sentence:"The timing on the first" ??
I will also...
Hi Rick and Tim,
Many thanks. I will try tounderstand it so I can make it to a certain row. I actually need to delete to rows.
Ayway, I made a caracter with 1 point in the bottom right corner....
so,
It is working nicely. The only problem I am running into is that I do not want to use cls all the time while that flickers the screen. I made a custom font but it seems that the numbers are...
It Compiles!!!
Thanks a lot. I am sorry to have been so uncarefull. I could have looked at it for another month and would not have found it..
Thanks soo much.
Now I can go further and...
The standard pprint compiles and works fine.
When making OPT file form the normal pprint32_16I.inc file it gives the same error that I had with the other program:
ASM Error:ERROR [113]...
I found the problem in my main pc with the command: It needs the word "Declare".
Now it gives:" incompatible LCD type for external Print subroutine" if I use the earlier mentioned code.
And...
I have installed the latest version of PPB also on my main computer. On this pc I get different errors.
He does not recognise GLCD_EXTERNAL_PRINT=PPRINT as a command line. I get no color and an...
below is my code. It is just for test. This gives the variable errors.
The code I got from rcurl gives the pprint32_16I_OPT.inc error..
Device 18F2520
Config_Start
OSC = intio67...
I wanted to edit my post but was not possible.
The first errormessage for the variables is :Illegal opcode..
Hi Tim,
Thanks a lot. If I implement it, it gives the following error that it can not find the pprint32_16I_OPT.INC file...
This is with another test program. If I adress the pprint32 in my own...
Hi,
Thanks very much. It works great. The only thing is that the font is a bit small for what I wantt so I need to go over to try to use the pprint32 command. I have the pprint32 but now it gives...
I am also busy with it and run into the same problem.. Can anybody PM the pprint32 files to me also please?
Hello,
I am trying to use pprint according the example on this site. when compiling it gives a problem on not finding the ARIAL___12.fnt file. I can not seem to find it and a lot of links in the...
in the meantime i saw somewhere that it should be supported. It stated "limited support" but it did not state what is the "limited" part, as it is specified for other pics (which commands can not be...
nobody?
I am still wondering if I can program this or any HV pic.
Sorry Tim,
I know I am rather new and not a genious but I have read the manual also (twice already). Except about the basics, it does not state a lot about the interrupt routine for serial...
Hello Paul and others,
Thanks for your reaction. I have already some codes running with Interrupts and they work fine. I have spend all yesterday evening to look into it again but I can just not...
hello,
In the above code the "return" of the interrupt should be a context restore... Than the programm goes into the interrupt, but does not come out anymore.. The programm does not go to...
so, latest update.
I have decided to go with hardware serial commands. A communiation with HSRIN/HSROUT I got working. Now I would like to make the receiver side on a interrupt so that I can do...
hello,
the rsin commend works for me at this moment. I am trying to search the forum but can not find if I can trigger the RSIN command on a interrupt. So as soon a signal is coming into the rsin...
hello Paul,
Sorry, but I do not understand what you mean with "You could pole the sending pics for any new data?"?
Also how should I do a decoupling?
The 16F648 also has the USART module which is programmed with HSRIN and HSROUT. to use this in my application, does that have any advantages? What is the difference between them; RSIN and HRSIN,...
Hi Gamboa,
Sounds logical. Do you (or anybody) have some simple example of the receiver or sender side for such serial information?
Hi see_mos,
That looks like a good way to do it. The change that two pics are exactly at the same time going to send something is very low.
Do you have aalso maybe a good way to indentify...
hi all,
I found out that it is no soo difficult. At the moment I am sending some word variables and receiving them on another pic with RSIN and RSOUT. I have just some more questions:
I want to...
Hi Tim,
Thanks for the answers!
I tihnk I can find out a lot when I have the beginning. At the moment I would be very happy to have two pics working so that 1 pic sends for example some text...
hi Tim,
Maybe thats a good idea.. Any idea about the schematic (also two wires with two 10k pullup resistors?)?
Does that also work with a master and slaves?
Do you have any simple example for...
Hello all,
I want to have information of different pics (all on 1 pcb) to 1 display. I think the best is to have 1 pic with the lcd and to send information from the different pics to this LCD-PIC....
I thought so that I needed to use the tmr0 counter. I will go into this. In the meantime I added some code and I think I am running into the maximum the pic can have. (Argument out of range, not...
Hello
I am new here and experimenting with a Speedometer, a tachometer, a gear indication and meter counter. at the moment I am still using the 16F628.
The first 3 I have done. The speedometer...