thanks.
portc.1 is for the led i will make a led dimmer.(0-255 = %0 -%100 intensty)
but there is some problem on the code i think.
thanks.
portc.1 is for the led i will make a led dimmer.(0-255 = %0 -%100 intensty)
but there is some problem on the code i think.
I do not see RCREG defined as a variable.
Dave
Always wear safety glasses while programming.
thanks for your qick answer friend .
i was looking for a example code in this forum and saw many examples and wanted to make it for my pic 16F876 i have forund that code here in the forum and it was and also they said that it is working code.but can you say where is my problem on that code it is not working
http://www.picbasic.co.uk/forum/show...ghlight=dmx%2A
Hi,
RCREG is the hardware USART receive register (SFR). You are trying to dump its value (dimming value) to a Port PIN C.1 . You should use a PWM to achieve this. Your checkdmx routine waits for a valid address and then grabs the byte being received. Use the Hardware PWM unit to make your life easier.level1 = RCREG
portC.1 = level1 'i want to dimm led on port c.1
RCSTA.7 = 0
Regards
Sougata
thanks for answer and can you say me how to use it ? i dont know cause ima new user on pbp
You do know that you aren't going to dim anything using just portc.1 and turning it on and off. You have to use a PWM output or some sort of software driven PWM...change the duty cycle. Just sending the intensity (0-255, a byte value) to portc.1 (a bit value) isn't going to do anything for you...
And I'm done answering your multiple questions in multiple forums about the same thing...
Bookmarks