We study a sampled-data implementation of the PID controller. Since the derivative is hard to measure directly, it is approximated using a finite difference giving rise to a delayed sampled-data controller. We suggest a novel method for the analysis of the resulting closed-loop system that allows to use only the last two measurements, while the existing results used a history of measurements. This method also leads to essentially larger sampling period. We show that, if the sampling period is small enough, then the performance of the closed-loop system under the sampled-data PID controller is preserved close to the one under the continuous-time PID controller. The maximum sampling period is obtained from LMIs derived using an appropriate Lyapunov-Krasovskii functional. These LMIs allow to consider systems with uncertain parameters. Finally, we develop an event-triggering mechanism that allows to reduce the amount of sampled control signals used for stabilization.