The first thing that pops out at me is the ADCIN line. The ADCIN command accepts the ADC channel, not the pin. Try this instead:
ADCIN 0,an1
Type: Posts; User: Kamikaze47; Keyword(s):
The first thing that pops out at me is the ADCIN line. The ADCIN command accepts the ADC channel, not the pin. Try this instead:
ADCIN 0,an1
How about:
byte=0-bit
The angle needs to be in radians. If you multiply the angle in degrees by Pi/180 you will get the angle in radians.
When you do so, it comes out to 480....
Try using PORTD instead of PortD
I'm assuming that the changing frequency shown on the scope was because you were changing the frequency yourself. If thats the case, does it ever glitch when the frequency is left the same or is it...
If it's just zero crossing you need you can do that with comparitors. Detecting the zero crossings of 3 phases would just require 3 comparitors.
You would require a USB host. I dont beleve its possible with just a PIC18. The PIC18s with built in USB are USB slave devices only.
If I was you I would look for a USB host chip that you could...
I'm not sure if this is the problem, but try:
ADCON2.7=1
Unfortunately, 1-Wire still needs a common ground.
The loop back plug is a good idea. The only thing I can think of that it wouldn't be able to test is if there happens to be a short across one of...
Thanks for the suggestions. I don't really want to use mains for ground - mainly because it will make the device much more bulky with a power cord and also less convenient because it would need a...
Years ago I made a LAN cable tester using PBP and its served me very well. It displays on a 2x16 LCD if the cable is standard or crossover, and lets you know if there are broken wires, crossed wires...
It may differ from PIC to PIC so check the data sheet, but taking the 18F1320 as an example, the following would turn off HPWM:
CCP1CON=0
It's hard to say what's happening without seeing the code.
Keep in mind that crystals do not keep perfect time. They have a rated accuracy - usually in ppm (parts per million). They are also prone...
Thanks very much DT.
Hi, I have PBP 2.60A and I need support for 16F1828 PICs.
I have the latest MPASM which has support for the 16F1828, but PBP is missing the INC and BAS files for it.
Could someone give advice...
I would also change the line you mentioned to:
I2CWRITE i2Dpin,i2CLKpin,$EE,[$FD]
I would also change the 1st one to:
I2CWRITE i2Dpin,i2CLKpin,$EE,[$FF,$F0]
If that does not help, I would try...
The 12F510 would be the cheapest that meets your requirements:
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en023670
*edit*: as long as you dont need a lot of code space. The code...
Everything you need is in the data sheet.
You can set the port directions using TRISIO.x=y where x is the GPIO bit number and y is 0 out output or 1 for input. Or use the PBP INPUT or OUTPUT...
I have tried 2 difference sources. Firstly a computer power supply's 5v rail, and ive also tried the 5v source on the pickit2. No regulator.
The blue is bottom layer - all surface mount...
still no luck unfortunately
when i turned it on after it being off over night, it took 3 mins to start running.
once it was running it seems to work fine, and turning it off and back on results...
The only SMD tantalum cap I had handy was 1uF so I soldered it as close to the pic's supply pins as possible and it seems to have fixed the issue.
I'll know for sure once I've left it off night...
I'm still noticing something strange.
When I turn it on for the first time in half an hour, it takes about 3 seconds to start running.
If I then turn it off, and back on it starts right away.
...
it seems to be running happily at 64hmz
i dont understand why since i tried 2 different 10mhz crystals
I just replaced it with a 16mhz which is working but that could just be because of the heating up. The test will be leaving it for half an hour and see if it still works. I'll post again then
I added a pullup resistor to PORTA.4
It's definitely the osc because if I leave it running for 15 mins or so it does eventually display "Hello World!" extremely slowly.