i have no problem with that... if i disable analog stuff before. On PORTA... there's big chance.At this point I dont care anymore, I'll just never use port A again!
Wich PIC?
i have no problem with that... if i disable analog stuff before. On PORTA... there's big chance.At this point I dont care anymore, I'll just never use port A again!
Wich PIC?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Originally Posted by mister_e
The good ol' F88.
I want to write the code on the 2550, but it wont fit in my programmer and I have not yet made a header, or the pcb for my project, if I had, I could have used ISP on the 2550.....
So I just grabbed a F88 off my serial relay project and erased it, started on that one.
I cant see why if the Pic running at 5v can drain enough current through port A to make the PC serial port see data, why it cant make a max 232 see data when its pumping 5v into a 5v input..............
Other odd thing is all my port a's and port b's have 1k resistors and leds on, that way I can 'see' when data is being thrown out, on port B the led is brighter than on port A.......
Setting the port pins high with the 'high portx.y' cause the leds to be the same brightness, on either port a or b.
If there the same brightness, it cant be the pic's port is not sourcing as much current, they the same, but with a serout command they are not the same brightness, so whats going on!
either its a pic chip thing, or a compiler thing setting something different, or not setting something 'extra' that port A needs to source as much current in serout mode as port B does.
I would like to know whats going on, as both should work and only one is, but I'm not letting it slow me down I can live with only using port B for now while I test the code snippets, and I was using port B on the final board design anyway, was just annoyed at losing nearly a day to find a solution thats a problem caused by an 'undocumented feature'
Now I need to find a way to store 150 bytes of 9600 baud incoming data and pics have no strings IIRC
Its no doubt in a manual somewhere.................
Ok so at least you never opened the PIC16F88 datasheet and discover what's multiplexed on PORTA and if it's enable by default? Right?
Once done, you'll know why.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I read the picbasic manual instead, it said if thou use that pin for serial, it shalt do serial.Originally Posted by mister_e
Which it does, but just not as efficiently, and only to some devices...........
If I set the port pin high with a high command, I get the same voltage on the pin as any other I set high, I dont have to worry about whats multiplexed on it / other uses it has, so why should the serout command not set everything up also?
In the manual little notes are included about other pic's with ''odd'' behaviour so I just presumed this had none to worry about.
it's not odd or curious.. it's normal. You're working with digital signal on analog by default I/o.
Open the PIC16F88 datasheet and discover the Analog section... section 12.0 and 13.0.
Now you need to disable the analog stuff
section 12.0 register 12-1 ANSEL:
ANSEL=0 ' set all related i/o to digital mode
Section 13.0 register 13-1 CMCON (and figure 13-1)
CMCON=7 ' Disable analog comparator
ok those comparator are already disabled by add the line just for safety sake
So add
ANSEL=0
CMCON=7
at the top of your code.
About now?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks