Hi Rob, ====================sI have used your working program for the 16F18877 injstead of the 16F18857 and added before forever : ------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- alias servo_1 is pin_B0 alias servo_1_direction is pin_B0_direction servo_1_direction = output
alias servo_2 is pin_B1
alias servo_2_direction is pin_B1_direction
servo_2_direction = output
-- choose min & max servo movment / pulse size
const byte SERVO_MIN = 50 -- default is 50 (0.5ms min pulse)
const byte SERVO_MAX = 255 -- default is 255 (2.5ms max pulse)
-- choose pic internal timers
const byte SERVO_USE_TIMER = 0 -- timer for servo's 1 to 8
--const byte SERVO_9_TO_16_USE_TIMER = 1 -- timer for servo's 9 to 16
--const byte SERVO_17_TO_24_USE_TIMER = 3 -- timer for servo's 17 to 24
include servo_rc_master -- include the servo library
servo_init()
-- basic position all servo's
-- center servo's
servo_move(127,1)
servo_move(127,2)
------------------------------------------------------------
-- --------------- Variables and start of program
----------------------------
-- Variables.
var word touch_x, touch_y, pixel_x, pixel_y
------------------------------------------------------------------------------------------------------------------------------------------------------
end then on some more places servo movements:
--------------------------------------------------------------------------------------------------------
forever loop
-- Start with showing the calibration figures.
glcd_pen_color = ILI9341_WHITE
calibrate_touch_screen()
-- Wait for the 'DONE' button to be pressed.
draw_button()
while !button_touched() loop
-- Wait for button.
end loop
------------------------------------------------
servo_move(40,1)
servo_move(40,2)
--------------------------------------------------
-- Read the touch screen and show the touch screen coordinated
---------------------------------------------------------------------------------------------------------------------------------------------------------------
print_word_dec(glcd, pixel_y)
print_string(glcd, " ")
end if
until button_touched()
servo_move(180,1)
servo_move(180,2)
-- Show the drawing function in different screen orientations.
-- 0 degrees rotation
----------------------------------------------------------------------------------------------------------------------------------------------------------
-- Restore rotation.
ili9341_set_display_rotation(ILI9341_ROTATE_0_DEGREES)
ads7843_set_screen_orientation(ADS7843_ROTATE_0_DEGREES)
servo_move(127,1)
servo_move(127,2)
end loop
Op woensdag 9 november 2022 om 18:54:01 UTC+1 schreef [email protected]:
> Hello Hans,
>
> There should not be any interference as far as I can see. The servo
> library uses regular pins so does the ads7833 library.
>
> If you could share your program that could help to analyze the issue.
>
> I did hear from Peter some time agaon that he had problems with regular
> pins when using PPS. That was solved by defining the regular pins after PPS
> was done.
>
> If he declared them before executing PPS (not sure by the way if you are
> using PPS) then it did not work. Strange behaviour btw.
>
> Kind regards,
>
> Rob
>
> ------------------------------
> *Van:* [email protected] <[email protected]> namens hans <
> [email protected]>
> *Verzonden:* woensdag 9 november 2022 11:11
> *Aan:* jallib <[email protected]>
> *Onderwerp:* [jallib] ADS file with rc-master
>
> Hello ,
> I am trying to combine the fine working example from the sample file :
> 16F18877_touch_ads7843.jal with the servo lib : servo_rc_master.
> I can not do that.
> Is this combination possible and if so, what should I pay attention to?
> But thanks again in advance.
> Hans
>
> --
> You received this message because you are subscribed to the Google Groups
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jallib/bdcbdf9e-502c-4e2c-90ed-b5c3dcd2f78bn%40googlegroups.com
>
> <https://groups.google.com/d/msgid/jallib/bdcbdf9e-502c-4e2c-90ed-b5c3dcd2f78bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jallib/674e05da-38e7-46d2-af56-7614404b3115n%40googlegroups.com.
16f18877_touch_ads7843_servo.jal
Description: Binary data
